lightning/dockers/nvidia/Dockerfile

66 lines
2.2 KiB
Docker
Raw Normal View History

# 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.
ARG PYTORCH_VERSION=22.09
2021-05-07 11:13:54 +00:00
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes
FROM nvcr.io/nvidia/pytorch:${PYTORCH_VERSION}-py3
LABEL maintainer="Lightning-AI <https://github.com/Lightning-AI>"
ARG LIGHTNING_VERSION=""
RUN python -c "import torch ; print(torch.__version__)" >> torch_version.info
2022-07-15 21:36:19 +00:00
COPY ./ /workspace/lightning/
RUN \
cd /workspace && \
# replace by specific version if asked
if [ ! -z "$LIGHTNING_VERSION" ] ; then \
2022-07-15 21:36:19 +00:00
rm -rf lightning ; \
git clone https://github.com/Lightning-AI/lightning.git ; \
2022-07-15 21:36:19 +00:00
cd lightning ; \
2021-11-29 14:14:37 +00:00
git checkout ${LIGHTNING_VERSION} ; \
git submodule update --init --recursive ; \
cd .. ; \
fi && \
2022-07-15 21:36:19 +00:00
# save the examples \
ls -lh lightning/ && \
mv lightning/_notebooks/.notebooks/ notebooks && \
cp -r lightning/*examples . && \
# Installations \
pip install -q fire && \
pip install "Pillow>=8.2, !=8.3.0" "cryptography>=3.4" "py>=1.10" --no-cache-dir && \
2022-07-15 21:36:19 +00:00
pip install ./lightning["extra","loggers","strategies","examples"] --no-cache-dir && \
rm -rf lightning && \
pip list
RUN pip install jupyterlab[all] -U
ENV PYTHONPATH="/workspace"
RUN \
TORCH_VERSION=$(cat torch_version.info) && \
rm torch_version.info && \
2022-07-15 21:36:19 +00:00
ls -lh . && \
python --version && \
pip --version && \
pip list | grep torch && \
python -c "import torch; assert torch.__version__.startswith('$TORCH_VERSION'), torch.__version__" && \
LAI: creating mirror package (#15105) * placeholder * mirror + prune * makedir * setup * ci * ci * name * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci clean * empty * py * parallel * doctest * flake8 * ci * typo * replace * clean * Apply suggestions from code review * re.sub * fix UI path * full replace * ui path? * replace * updates * regex * ci * fix * ci * path * ci * replace * Update .actions/setup_tools.py Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * also convert lightning_lite tests for PL tests to adapt mocking paths * fix app example test * update logger propagation for PL tests * update logger propagation for PL tests * Apply suggestions from code review * Revert "update logger propagation for PL tests" This reverts commit c1a5e119c740b5468daac63028de8aa799a177ac. * playwright * py * update import in tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * try edit import in overwrite * debug code * rev playwright * Revert "try edit import in overwrite" This reverts commit c02f766521c91454be36b19784c6a3ed2f715109. * ci: adjust examples * adjust examples cloud * mock lightning_app * Install assistant dependencies * lightning * setup * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * Apply suggestions from code review * disable cache * move doctest to install * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ) * echo ./ * ci * lru * revert disabling cache, prints * ci * prune ci jobs * prune ci jobs * training loop standalone tests * add sys modules cleanup fixture * make use of fixture * revert standalone * ci e2e * fix imports in lightning * fix imports of lightning in tests * Revert "make use of fixture" This reverts commit c15efdd205da2353187275a8d3da141d0ec0ec0a. * Revert other commits for fixtures * revert use of fixture * py3.9 * fix mocking * fix paths * hack mocking * docs * Apply suggestions from code review * rev suggestion * Minor changes to the parametrizations * Update checkgroup with the new and changed jobs * include frontend dir * cli * fix imports and entry point * Revert standalone * rc1 * e2e on staging * Revert "Revert standalone" This reverts commit 9df96685b866b1719fcdeb0b2e832255e3a5f8c0. * groups * to * ci: pt ver * docker * Apply suggestions from code review * Copy over changes from previous commit to other groups * Add back changes from bad merge * Uppercase step name everywhere * update * ci * ci: lai oldest Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com> Co-authored-by: Justus Schock <justus.schock@posteo.de> Co-authored-by: manskx <ahmed.mansy156@gmail.com> Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: thomas chaton <thomas@grid.ai> Co-authored-by: Luca Antiga <luca.antiga@gmail.com>
2022-10-27 10:32:49 +00:00
python -c "import lightning as L; print(L.__version__)"
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]