Skip to content

Commit

Permalink
Merge pull request Kaggle#903 from Kaggle/upgrade-torch1.7
Browse files Browse the repository at this point in the history
Upgrade to PyTorch 1.7
  • Loading branch information
rosbo committed Nov 27, 2020
2 parents 90d2728 + a8b0994 commit 84a5c03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ RUN conda config --add channels conda-forge && \
# ^ rapidsai is the highest priority channel, default lowest, conda-forge 2nd lowest.
# 161473620#comment7 pin required to prevent resolver from picking pysal 1.x., pysal 2.2.x is also downloading data on import.
conda install matplotlib basemap cartopy python-igraph imagemagick "pysal==2.1.0" && \
# b/142337634#comment22 pin required to avoid torchaudio downgrade.
# b/162357958##comment7 Upgrade once new versions of torch* libs are released for pytorch 1.6.
conda install "pytorch=1.6" "torchvision=0.7" "torchaudio=0.6" "torchtext=0.7" cpuonly && \
conda install "pytorch=1.7" "torchvision=0.8" "torchaudio=0.7" "torchtext=0.8" cpuonly && \
/tmp/clean-layer.sh

# The anaconda base image includes outdated versions of these packages. Update them to include the latest version.
Expand Down Expand Up @@ -370,10 +368,7 @@ RUN pip install bcolz && \
pip install widgetsnbextension && \
pip install pyarrow && \
pip install feather-format && \
# b/172491515: Unpin after upgrading to torch 1.7
pip install fastai==2.0.19 && \
# b/172491515: Remove the next line after removing pin for fastai
pip install fastcore==1.3.2 && \
pip install fastai && \
pip install allennlp && \
python -m spacy download en && python -m spacy download en_core_web_lg && \
apt-get install -y ffmpeg && \
Expand Down
2 changes: 1 addition & 1 deletion gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get install -y ocl-icd-libopencl1 clinfo libboost-all-dev && \
# However, because this image is based on the CPU image, this isn't possible but better
# to put them at the top of this file to minize conflicts.
RUN conda remove --force -y pytorch torchvision torchaudio cpuonly && \
conda install "pytorch=1.6" "torchvision=0.7" "torchaudio=0.6" "torchtext=0.7" "cudf=0.16" "cuml=0.16" cudatoolkit=$CUDA_VERSION && \
conda install "pytorch=1.7" "torchvision=0.8" "torchaudio=0.7" "torchtext=0.8" "cudf=0.16" "cuml=0.16" cudatoolkit=$CUDA_VERSION && \
/tmp/clean-layer.sh

# Install LightGBM with GPU
Expand Down

0 comments on commit 84a5c03

Please sign in to comment.