try to update failing dockers (#5611)

This commit is contained in:
Jirka Borovec 2021-01-25 23:10:56 +01:00 committed by GitHub
parent 7b30133a82
commit 9be04c1c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 17 deletions

View File

@ -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 \

View File

@ -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 \

View File

@ -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

View File

@ -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 && \

View File

@ -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__)"