diff --git a/.github/workflows/publish_conda.yml b/.github/workflows/publish_conda.yml index bd258136f..01010a796 100644 --- a/.github/workflows/publish_conda.yml +++ b/.github/workflows/publish_conda.yml @@ -22,7 +22,7 @@ jobs: - name: Install build tools run: apt update && apt install -y build-essential - name: publish-to-conda - uses: jegp/conda-package-publish-action@v1.4 + uses: jegp/conda-package-publish-action@v1.5 with: subDir: "publish/conda" anacondatoken: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index fa9762447..88b909b49 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -20,26 +20,24 @@ jobs: username: "norse+github_actions" password: ${{ secrets.QUAY_TOKEN }} - - name: Build and push vanilla + - name: Build and push vanilla Python version id: docker_build_vanilla uses: docker/build-push-action@v2 with: context: . file: publish/Dockerfile push: true - tags: quay.io/norse/norse:${{ GITHUB_REF }},quay.io/norse/norse:latest - + tags: quay.io/norse/norse:${{ env.GITHUB_REF }},quay.io/norse/norse:latest - name: Image digest run: echo ${{ steps.docker_build_vanilla.outputs.digest }} - - name: Build and push miniconda - id: docker_build_conda + - name: Build and push CUDA version + id: docker_build_cuda uses: docker/build-push-action@v2 with: context: . - file: publish/Dockerfile.conda + file: publish/Dockerfile.cuda push: true - tags: quay.io/norse/norse:${{ GITHUB_REF }}-conda,quay.io/norse/norse:latest-conda - + tags: quay.io/norse/norse:${{ env.GITHUB_REF }}-cuda,quay.io/norse/norse:latest-cuda - name: Image digest - run: echo ${{ steps.docker_build_conda.outputs.digest }} + run: echo ${{ steps.docker_build_cuda.outputs.digest }} diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index bd6066a4a..d452f8aa9 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -37,7 +37,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install build dependencies run: | - pip install setuptools wheel pytest-xdist + pip install setuptools wheel pytest-xdist tensorboard matplotlib pip install -e . - name: Run unit tests run: pytest -n auto norse diff --git a/docs/pages/installing.rst b/docs/pages/installing.rst index 533789e67..d40cbfbb1 100644 --- a/docs/pages/installing.rst +++ b/docs/pages/installing.rst @@ -48,21 +48,13 @@ Note that the following commands require access to a cd norse python setup.py install -* Installing with `Docker `_ +* Installing with `Docker `_, available on [quay.io](https://quay.io/norse/norse) .. code:: bash docker pull quay.io/norse/norse - - -Windows -^^^^^^^ - -We strongly recommend you use the Docker approach when installing Norse on Windows. -Please see `the installation guide for Windows `_ for accurate instructions. - -We also provide a Docker image bundled with Conda, available like so: -``docker pull quay.io/norse/norse:conda-latest``. + # Or, using CUDA + docker pull quay.io/norse/norse:latest-cuda Optional dependencies @@ -97,7 +89,8 @@ And voila! GPU acceleration ^^^^^^^^^^^^^^^^ -If you would like to have GPU hardware acceleration, you will have to enable the -NVIDIA runtime, as described here: https://developer.nvidia.com/nvidia-container-runtime. +If you would like to have GPU hardware acceleration when running the ``latest-cuda`` version of the +docker container, you will have to enable the NVIDIA runtime, +as described here: https://developer.nvidia.com/nvidia-container-runtime. -For more information, please refer to our page on :ref:`page-hardware`. \ No newline at end of file +For more information on hardware acceleration, please refer to our page on :ref:`page-hardware`. \ No newline at end of file diff --git a/publish/Dockerfile b/publish/Dockerfile index 417ad6ce7..b372b358a 100644 --- a/publish/Dockerfile +++ b/publish/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:11.1-cudnn8-runtime-ubuntu20.04 +FROM python:3-slim RUN apt update && apt install -y python3-pip build-essential RUN rm -rf /var/lib/apt/lists/ diff --git a/publish/Dockerfile.cuda b/publish/Dockerfile.cuda new file mode 100644 index 000000000..27a2d41c0 --- /dev/null +++ b/publish/Dockerfile.cuda @@ -0,0 +1,11 @@ +FROM nvidia/cuda:11.4.1-cudnn8-runtime-ubuntu20.04 + +RUN apt update && apt install -y python3-pip build-essential +RUN rm -rf /var/lib/apt/lists/ + +WORKDIR /norse + +COPY . . + +RUN pip3 install --upgrade pip +RUN pip3 install -e . \ No newline at end of file diff --git a/publish/set_win_env.bat b/publish/set_win_env.bat deleted file mode 100644 index 2cf25eaaa..000000000 --- a/publish/set_win_env.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -SET DISTUTILS_USE_SDK=1 -SET env_path_root=C:\Program Files (x86)\Microsoft Visual Studio\2019 -SET env_path_head=VC\Auxiliary\Build\vcvars64.bat - -IF EXIST "%env_path_root%\BuildTools\%env_path_head%" ( - "%env_path_root%\BuildTools\%env_path_head%" -) ELSE ( - IF EXIST "%build_root_path%\Community\%env_path_head%" ( - "%build_root_path%\Community\%env_path_head%" - ) ELSE ( - IF EXIST "%build_root_path%\Professional\%env_path_head%" ( - "%build_root_path%\Professional\%env_path_head%" - ) ELSE ( - IF EXIST "%build_root_path%\Enterprise\%env_path_head%" ( - "%build_root_path%\Enterprise\%env_path_head%" - ) ELSE ( - echo Visual Studio 2019 required. - ) - ) - ) -)