diff --git a/dockers/base-conda/Dockerfile b/dockers/base-conda/Dockerfile index 8107d431aa..72bfb0b244 100644 --- a/dockers/base-conda/Dockerfile +++ b/dockers/base-conda/Dockerfile @@ -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 \ diff --git a/dockers/base-cuda/Dockerfile b/dockers/base-cuda/Dockerfile index 92b8e06cc4..bde54b8da7 100644 --- a/dockers/base-cuda/Dockerfile +++ b/dockers/base-cuda/Dockerfile @@ -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 \ diff --git a/dockers/base-xla/Dockerfile b/dockers/base-xla/Dockerfile index 5dfeac8c9e..61f94d7bb4 100644 --- a/dockers/base-xla/Dockerfile +++ b/dockers/base-xla/Dockerfile @@ -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 diff --git a/dockers/release/Dockerfile b/dockers/release/Dockerfile index 886e794ccd..c0778f8588 100644 --- a/dockers/release/Dockerfile +++ b/dockers/release/Dockerfile @@ -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 && \ diff --git a/dockers/tpu-tests/Dockerfile b/dockers/tpu-tests/Dockerfile index 464f7fd8f3..4e83bdcb0d 100644 --- a/dockers/tpu-tests/Dockerfile +++ b/dockers/tpu-tests/Dockerfile @@ -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__)"