Skip to content

Commit

Permalink
update shlib config to avoid ld_library_path use
Browse files Browse the repository at this point in the history
  • Loading branch information
agt committed Jul 22, 2023
1 parent bd646ce commit d1229bc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
ARG PYTHON_VERSION=python-3.9.5
FROM jupyter/base-notebook:$PYTHON_VERSION
# coerce change in all notebook
USER root

# see https://github.com/phusion/baseimage-docker/issues/319#issuecomment-1058835363
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NOWARNINGS="yes"

#COPY --from=nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu20.04 /usr/local/cuda-11.8 /usr/local/cuda-11.8

COPY --from=nvcr.io/nvidia/cuda:11.2.0-devel-ubuntu20.04 /usr/local/cuda-11.2 /usr/local/cuda-11.2
RUN ln -s cuda-11.2 /usr/local/cuda && ln -s cuda-11.2 /usr/local/cuda-11

RUN apt-get update -y && \
apt-get -qq install -y --no-install-recommends \
git \
Expand All @@ -38,6 +32,19 @@ RUN apt-get update -y && \
chmod g-s /usr/bin/screen && \
chmod 1777 /var/run/screen

######################################
# Now add in CUDA-11.2 tools/libraries
COPY --from=nvcr.io/nvidia/cuda:11.2.0-devel-ubuntu20.04 /usr/local/cuda-11.2 /usr/local/cuda-11.2
RUN ln -s cuda-11.2 /usr/local/cuda && ln -s cuda-11.2 /usr/local/cuda-11

# Configure dynamic library locations (similar to LD_LIBRARY_PATH)
RUN echo '/usr/local/cuda/targets/x86_64-linux/lib' >> /etc/ld.so.conf.d/000_cuda.conf && \
echo '/usr/local/cuda-11/targets/x86_64-linux/lib' >> /etc/ld.so.conf.d/989_cuda-11.conf && \
( echo '/usr/local/nvidia/lib'; echo '/usr/local/nvidia/lib64' ) >> /etc/ld.so.conf.d/nvidia.conf

###########################################
# Remainder of install as nonprivleged user

USER jovyan

# nbgrader requires some variables set to just run the notebook server
Expand Down

0 comments on commit d1229bc

Please sign in to comment.