Skip to content

Commit

Permalink
Merge branch 'release/1.2-dev' into refactor/legacy-accel-plug
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 25, 2021
2 parents 34be725 + 9be04c1 commit 961849a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
10 changes: 2 additions & 8 deletions dockers/base-conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,9 @@ COPY ./requirements/extra.txt requirements-extra.txt
COPY ./requirements/test.txt requirements-test.txt

RUN \
# Disable cache
pip config set global.cache-dir false && \
# Drop fairscale for PT <= 1.4
if [[ $PYTORCH_VERSION < 1.4 ]] ; then \
python -c "fname = 'requirements-extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)" ; \
fi && \
# Install remaining requirements
pip install -r requirements-extra.txt --upgrade-strategy only-if-needed && \
pip install -r requirements-test.txt --upgrade-strategy only-if-needed && \
pip install -r requirements-extra.txt --no-cache-dir && \
pip install -r requirements-test.txt --no-cache-dir && \
rm requirements*

RUN \
Expand Down
6 changes: 1 addition & 5 deletions dockers/base-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,10 @@ RUN \
#pip install "torch==${PYTORCH_VERSION}.*" --pre && \
# set particular PyTorch version
python -c "import re ; fname = 'requirements.txt' ; req = re.sub(r'torch[>=]+[\d\.]+', 'torch==${PYTORCH_VERSION}.*', open(fname).read()) ; open(fname, 'w').write(req)" && \
# Drop fairscale for PT <= 1.4
if [[ $PYTORCH_VERSION < 1.4 ]] ; then \
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)" ; \
fi && \
# Install all requirements
# todo: find a way how to install nightly PT version
# --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu${cuda_ver[0]}${cuda_ver[1]}/torch_nightly.html
pip install -r requirements/devel.txt --upgrade-strategy only-if-needed --use-feature=2020-resolver && \
pip install -r requirements/devel.txt --no-cache-dir && \
rm -rf requirements*

RUN \
Expand Down
2 changes: 1 addition & 1 deletion dockers/base-xla/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ RUN \
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)" && \
# drop TorchVision as it was installed with XLA
python -c "fname = 'requirements/examples.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('torchvision')] ; open(fname, 'w').writelines(lines)" && \
pip install --requirement ./requirements/devel.txt --upgrade-strategy only-if-needed && \
pip install --requirement ./requirements/devel.txt --no-cache-dir && \
cd .. && \
rm -rf pytorch-lightning && \
rm -rf /root/.cache
Expand Down
4 changes: 2 additions & 2 deletions dockers/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ RUN \
#conda install "pip>20.1" && \
#pip config set global.cache-dir false && \
if [ -z $LIGHTNING_VERSION ] ; then \
pip install ./pytorch-lightning --upgrade-strategy only-if-needed ; \
pip install ./pytorch-lightning --no-cache-dir ; \
rm -rf pytorch-lightning ; \
else \
rm -rf pytorch-lightning ; \
pip install https://github.com/PyTorchLightning/pytorch-lightning/archive/${LIGHTNING_VERSION}.zip --upgrade-strategy only-if-needed ; \
pip install https://github.com/PyTorchLightning/pytorch-lightning/archive/${LIGHTNING_VERSION}.zip --no-cache-dir ; \
fi

RUN python --version && \
Expand Down
2 changes: 1 addition & 1 deletion dockers/tpu-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN \
python -c "fname = 'pytorch-lightning/requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)" && \
# drop fairscale as it is not needed
python -c "fname = 'pytorch-lightning/requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)" && \
pip install -r pytorch-lightning/requirements/devel.txt --no-cache-dir --upgrade-strategy only-if-needed
pip install -r pytorch-lightning/requirements/devel.txt --no-cache-dir

#RUN python -c "import pytorch_lightning as pl; print(pl.__version__)"

Expand Down

0 comments on commit 961849a

Please sign in to comment.