2020-04-25 18:17:09 +00:00
|
|
|
ARG PYTHON_VERSION=3.7
|
2020-09-24 21:14:15 +00:00
|
|
|
ARG PYTORCH_VERSION=1.5
|
2020-08-15 19:39:44 +00:00
|
|
|
|
2020-09-24 21:14:15 +00:00
|
|
|
FROM pytorchlightning/pytorch_lightning:base-cuda-py${PYTHON_VERSION}-torch${PYTORCH_VERSION}
|
2020-08-15 19:39:44 +00:00
|
|
|
|
2020-09-24 21:14:15 +00:00
|
|
|
ARG LIGHTNING_VERSION=""
|
2020-04-25 18:17:09 +00:00
|
|
|
|
2020-09-10 22:38:29 +00:00
|
|
|
COPY --chown=flash ./ ./pytorch-lightning/
|
|
|
|
|
2020-04-25 18:17:09 +00:00
|
|
|
# install dependencies
|
2020-09-10 22:38:29 +00:00
|
|
|
RUN \
|
2020-09-22 23:41:35 +00:00
|
|
|
# Disable cache
|
|
|
|
#conda install "pip>20.1" && \
|
|
|
|
#pip config set global.cache-dir false && \
|
2020-09-10 22:38:29 +00:00
|
|
|
if [ -z $LIGHTNING_VERSION ] ; then \
|
|
|
|
pip install ./pytorch-lightning --upgrade-strategy only-if-needed ; \
|
|
|
|
rm -rf pytorch-lightning ; \
|
|
|
|
else \
|
|
|
|
rm -rf pytorch-lightning ; \
|
|
|
|
pip install git+https://github.com/PyTorchLightning/pytorch-lightning.git@${LIGHTNING_VERSION} --upgrade-strategy only-if-needed ; \
|
|
|
|
fi
|
2020-04-25 18:17:09 +00:00
|
|
|
|
2020-08-15 19:39:44 +00:00
|
|
|
RUN python --version && \
|
|
|
|
pip --version && \
|
2020-09-22 23:41:35 +00:00
|
|
|
pip list && \
|
2020-09-24 21:14:15 +00:00
|
|
|
conda info && \
|
|
|
|
conda list && \
|
2020-08-15 19:39:44 +00:00
|
|
|
python -c "import pytorch_lightning as pl; print(pl.__version__)"
|
2020-09-24 21:14:15 +00:00
|
|
|
|
2020-04-25 18:17:09 +00:00
|
|
|
CMD ["/bin/bash"]
|