Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGC container PoC #6187

Merged
merged 10 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/ci_dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Build PL Docker
# publish master/release
uses: docker/build-push-action@v2
Expand All @@ -54,9 +51,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Build XLA Docker
# publish master/release
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -93,9 +87,6 @@ jobs:
echo "::set-output name=CUDA::$cuda"
id: extend

# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Build CUDA Docker
# publish master/release
uses: docker/build-push-action@v2
Expand Down Expand Up @@ -130,9 +121,6 @@ jobs:
echo "::set-output name=CUDA::$cuda"
id: extend

# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Build CUDA Docker
# publish master/release
uses: docker/build-push-action@v2
Expand All @@ -150,10 +138,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v1
- name: Build CUDA Docker

- name: Build NVIDIA Docker
uses: docker/build-push-action@v2
with:
file: dockers/nvidia/Dockerfile
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/events-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,26 @@ jobs:
push: true
tags: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
timeout-minutes: 55

# docker-nvidia:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# # https://github.com/docker/setup-buildx-action
# # Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
# - uses: docker/setup-buildx-action@v1
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Publish NVIDIA to Docker Hub
# uses: docker/build-push-action@v2
# with:
# file: dockers/nvidia/Dockerfile
# push: true
# tags: nvcr.io/pytorchlightning/pytorch_lightning:nvidia
# timeout-minutes: 55
26 changes: 25 additions & 1 deletion .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [created]

jobs:
build-PL:
cuda-PL:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -36,3 +36,27 @@ jobs:
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }},latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}"
timeout-minutes: 55

# nvidia-PL:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Get release version
# if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
# id: get_version
# run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})"
#
# - name: Publish Releases to Docker
# # only on releases
# uses: docker/build-push-action@v1.1.0
# if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
# with:
# repository: nvcr.io/pytorchlightning/pytorch_lightning
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# dockerfile: dockers/nvidia/Dockerfile
# build_args: LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
# tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-nvidia"
# timeout-minutes: 55
19 changes: 10 additions & 9 deletions dockers/nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM nvcr.io/nvidia/pytorch:20.12-py3
FROM nvcr.io/nvidia/pytorch:21.02-py3

MAINTAINER PyTorchLightning <https://github.com/PyTorchLightning>

Expand All @@ -22,16 +22,17 @@ COPY ./ ./pytorch-lightning/

# install dependencies
RUN \
# Disable cache
#conda install "pip>20.1" && \
#pip config set global.cache-dir false && \
if [ -z $LIGHTNING_VERSION ] ; then \
pip install ./pytorch-lightning --no-cache-dir ; \
pip list | grep torch && \
if [ ! -z "$LIGHTNING_VERSION" ] ; then \
rm -rf pytorch-lightning ; \
else \
rm -rf pytorch-lightning ; \
pip install https://github.com/PyTorchLightning/pytorch-lightning/archive/${LIGHTNING_VERSION}.zip --no-cache-dir ; \
fi
wget https://github.com/PyTorchLightning/pytorch-lightning/archive/${LIGHTNING_VERSION}.zip --progress=bar:force:noscroll ; \
unzip ${LIGHTNING_VERSION}.zip ; \
mv pytorch-lightning-*/ pytorch-lightning ; \
rm *.zip ; \
fi && \
pip install ./pytorch-lightning["extra"] --no-cache-dir && \
rm -rf pytorch-lightning

RUN python --version && \
pip --version && \
Expand Down
1 change: 0 additions & 1 deletion dockers/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ COPY ./ ./pytorch-lightning/

# install dependencies
RUN \
# Disable cache
#conda install "pip>20.1" && \
if [ ! -z "$LIGHTNING_VERSION" ] ; then \
rm -rf pytorch-lightning ; \
Expand Down