Skip to content

Commit

Permalink
Fixes related to release/publishing (#259)
Browse files Browse the repository at this point in the history
* Fixed conda, docker, and pypi workflow
* Updated docker publishing
* Updated installation docs
  • Loading branch information
Jegp committed Sep 20, 2021
1 parent 9724b33 commit ac33bfc
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_conda.yml
Expand Up @@ -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 }}
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/publish_docker.yml
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Expand Up @@ -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
Expand Down
21 changes: 7 additions & 14 deletions docs/pages/installing.rst
Expand Up @@ -48,21 +48,13 @@ Note that the following commands require access to a
cd norse
python setup.py install
* Installing with `Docker <https://en.wikipedia.org/wiki/Docker_(software)>`_
* Installing with `Docker <https://en.wikipedia.org/wiki/Docker_(software)>`_, 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 <https://docs.docker.com/docker-for-windows/install/>`_ 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
Expand Down Expand Up @@ -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`.
For more information on hardware acceleration, please refer to our page on :ref:`page-hardware`.
2 changes: 1 addition & 1 deletion 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/
Expand Down
11 changes: 11 additions & 0 deletions 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 .
22 changes: 0 additions & 22 deletions publish/set_win_env.bat

This file was deleted.

0 comments on commit ac33bfc

Please sign in to comment.