|
| 1 | +# Copyright The PyTorch Lightning team. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +FROM nvcr.io/nvidia/pytorch:20.12-py3 |
| 16 | + |
| 17 | +MAINTAINER PyTorchLightning <https://github.com/PyTorchLightning> |
| 18 | + |
| 19 | +ARG LIGHTNING_VERSION="" |
| 20 | + |
| 21 | +COPY ./ ./pytorch-lightning/ |
| 22 | + |
| 23 | +# install dependencies |
| 24 | +RUN \ |
| 25 | + # Disable cache |
| 26 | + #conda install "pip>20.1" && \ |
| 27 | + #pip config set global.cache-dir false && \ |
| 28 | + if [ -z $LIGHTNING_VERSION ] ; then \ |
| 29 | + pip install ./pytorch-lightning --no-cache-dir ; \ |
| 30 | + rm -rf pytorch-lightning ; \ |
| 31 | + else \ |
| 32 | + rm -rf pytorch-lightning ; \ |
| 33 | + pip install https://github.com/PyTorchLightning/pytorch-lightning/archive/${LIGHTNING_VERSION}.zip --no-cache-dir ; \ |
| 34 | + fi |
| 35 | + |
| 36 | +RUN python --version && \ |
| 37 | + pip --version && \ |
| 38 | + pip list && \ |
| 39 | + python -c "import pytorch_lightning as pl; print(pl.__version__)" |
| 40 | + |
| 41 | +# CMD ["/bin/bash"] |
0 commit comments