2021-01-29 16:01:03 +00:00
|
|
|
# Copyright The PyTorch Lightning team.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2021-03-19 21:25:46 +00:00
|
|
|
FROM nvcr.io/nvidia/pytorch:21.02-py3
|
2021-01-29 16:01:03 +00:00
|
|
|
|
|
|
|
MAINTAINER PyTorchLightning <https://github.com/PyTorchLightning>
|
|
|
|
|
|
|
|
ARG LIGHTNING_VERSION=""
|
|
|
|
|
|
|
|
COPY ./ ./pytorch-lightning/
|
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
RUN \
|
|
|
|
#conda install "pip>20.1" && \
|
2021-03-19 21:25:46 +00:00
|
|
|
pip list | grep torch && \
|
|
|
|
if [ ! -z "$LIGHTNING_VERSION" ] ; then \
|
2021-01-29 16:01:03 +00:00
|
|
|
rm -rf pytorch-lightning ; \
|
2021-03-19 21:25:46 +00:00
|
|
|
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
|
2021-01-29 16:01:03 +00:00
|
|
|
|
|
|
|
RUN python --version && \
|
|
|
|
pip --version && \
|
|
|
|
pip list && \
|
|
|
|
python -c "import pytorch_lightning as pl; print(pl.__version__)"
|
|
|
|
|
|
|
|
# CMD ["/bin/bash"]
|