Skip to content

Commit eba9a4d

Browse files
authored
Pin pytorch-lightning & torchmetrics. (#1073)
Latest versions causing the following error at runtime: ``` ... File "/opt/conda/lib/python3.7/site-packages/torchmetrics/utilities/imports.py", line 33, in _module_available return find_spec(module_path) is not None File "/opt/conda/lib/python3.7/importlib/util.py", line 114, in find_spec raise ValueError('{}.__spec__ is None'.format(name)) ValueError: transformers.__spec__ is None ``` Also, remove /opt/conda/lib from LD_LIBRARY_PATH only when fetching packages over https using apt. Otherwise, this is causing an issue with scipy which expects a different version of glibc. http://b/198635596
1 parent 0e2265e commit eba9a4d

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list &
2525
/tmp/clean-layer.sh
2626

2727
# Make sure the dynamic linker finds the right libstdc++
28-
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/opt/conda/lib
28+
ENV LD_LIBRARY_PATH=/opt/conda/lib
2929
# b/128333086: Set PROJ_LIB to points to the proj4 cartographic library.
3030
ENV PROJ_LIB=/opt/conda/share/proj
3131

@@ -391,7 +391,9 @@ RUN pip install flashtext && \
391391
pip install tensorflow-datasets && \
392392
pip install pydub && \
393393
pip install pydegensac && \
394-
pip install pytorch-lightning && \
394+
# b/198635596 latest versions of torchmetrics & pytorch-lightning are failing at runtime.
395+
pip install torchmetrics==0.5.0 && \
396+
pip install pytorch-lightning==1.4.4 && \
395397
pip install datatable && \
396398
pip install sympy && \
397399
# flask is used by agents in the simulation competitions.

gpu.Dockerfile

+8-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/opt/bin:${PATH}
2121
# CUDA user libraries, either manually or through the use of nvidia-docker) exclude them. One
2222
# convenient way to do so is to obscure its contents by a bind mount:
2323
# docker run .... -v /non-existing-directory:/usr/local/cuda/lib64/stubs:ro ...
24-
ENV LD_LIBRARY_PATH_NO_STUBS="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
25-
ENV LD_LIBRARY_PATH="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
26-
ENV NVIDIA_VISIBLE_DEVICES=all
27-
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
28-
ENV NVIDIA_REQUIRE_CUDA="cuda>=$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION"
24+
# b/197989446#comment7 libgnutls version at /opt/conda/lib causes apt to fail to fetch packages using https URLs.
25+
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
2926
RUN apt-get update && apt-get install -y --no-install-recommends \
3027
cuda-cupti-$CUDA_VERSION \
3128
cuda-cudart-$CUDA_VERSION \
@@ -43,6 +40,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4340
ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
4441
/tmp/clean-layer.sh
4542

43+
ENV LD_LIBRARY_PATH_NO_STUBS="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/opt/conda/lib"
44+
ENV LD_LIBRARY_PATH="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:/opt/conda/lib"
45+
ENV NVIDIA_VISIBLE_DEVICES=all
46+
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
47+
ENV NVIDIA_REQUIRE_CUDA="cuda>=$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION"
48+
4649
# Install OpenCL & libboost (required by LightGBM GPU version)
4750
RUN apt-get install -y ocl-icd-libopencl1 clinfo libboost-all-dev && \
4851
mkdir -p /etc/OpenCL/vendors && \

0 commit comments

Comments
 (0)