fix PL release docker (#13439)

This commit is contained in:
Jirka Borovec 2022-06-29 19:36:36 +02:00 committed by GitHub
parent b332b66328
commit 30dce29005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -13,7 +13,7 @@
# limitations under the License.
ARG PYTHON_VERSION=3.9
ARG PYTORCH_VERSION=1.9
ARG PYTORCH_VERSION=1.11
FROM pytorchlightning/pytorch_lightning:base-cuda-py${PYTHON_VERSION}-torch${PYTORCH_VERSION}
@ -21,23 +21,28 @@ LABEL maintainer="Lightning-AI <https://github.com/Lightning-AI>"
ARG LIGHTNING_VERSION=""
COPY ./ /home/pytorch-lightning/
COPY ./ /home/lightning/
ENV PACKAGE_NAME=pytorch
# install dependencies
RUN \
cd /home && \
mv pytorch-lightning/_notebooks notebooks && \
mv pytorch-lightning/examples . && \
mv lightning/_notebooks notebooks && \
mv lightning/examples . && \
# replace by specific version if asked
if [ ! -z "$LIGHTNING_VERSION" ] ; then \
rm -rf pytorch-lightning ; \
rm -rf lightning ; \
wget https://github.com/Lightning-AI/lightning/archive/${LIGHTNING_VERSION}.zip --progress=bar:force:noscroll ; \
unzip ${LIGHTNING_VERSION}.zip ; \
mv pytorch-lightning-*/ pytorch-lightning ; \
mv lightning-*/ lightning ; \
rm *.zip ; \
fi && \
pip install ./pytorch-lightning["extra","loggers","strategies"] --no-cache-dir && \
rm -rf pytorch-lightning
# otherwise there is collision with folder name ans pkg name on Pypi
cd lightning && \
pip install .["extra","loggers","strategies"] --no-cache-dir && \
cd .. && \
rm -rf lightning
RUN python --version && \
pip --version && \