mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-23 22:37:41 +08:00
Update Dockerfile
This commit is contained in:
parent
3d4715794e
commit
b73143604a
1 changed files with 11 additions and 12 deletions
23
Dockerfile
23
Dockerfile
|
@ -13,22 +13,23 @@ RUN distro="ubuntu$(. /etc/lsb-release; echo "$DISTRIB_RELEASE" | tr -d '.')" &&
|
||||||
# Official Docker images use the sbsa packages when targetting arm64.
|
# Official Docker images use the sbsa packages when targetting arm64.
|
||||||
# See https://gitlab.com/nvidia/container-images/cuda/-/blob/85f465ea3343a2d7f7753a0a838701999ed58a01/dist/12.5.1/ubuntu2204/base/Dockerfile#L12
|
# See https://gitlab.com/nvidia/container-images/cuda/-/blob/85f465ea3343a2d7f7753a0a838701999ed58a01/dist/12.5.1/ubuntu2204/base/Dockerfile#L12
|
||||||
arch="$(if [ "$(uname -m)" = "aarch64" ]; then echo "sbsa"; else echo "x86_64"; fi)" && \
|
arch="$(if [ "$(uname -m)" = "aarch64" ]; then echo "sbsa"; else echo "x86_64"; fi)" && \
|
||||||
apt update -q && apt install -y ca-certificates wget && \
|
apt-get update && apt-get install -y ca-certificates wget && \
|
||||||
wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.1-1_all.deb && \
|
wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.1-1_all.deb && \
|
||||||
dpkg -i /tmp/cuda-keyring.deb && apt update -q
|
dpkg -i /tmp/cuda-keyring.deb && apt-get update && \
|
||||||
|
# In order to minimize the image size, we install only a subset of
|
||||||
# In order to minimize the image size, we install only a subset of
|
# the CUDA toolkit that is required by Elixir numerical packages
|
||||||
# the CUDA toolkit that is required by Elixir numerical packages
|
# (nvcc and runtime libraries). Note that we do not need to install
|
||||||
# (nvcc and runtime libraries). Note that we do not need to install
|
# the driver, it is already provided by NVIDIA Container Toolkit.
|
||||||
# the driver, it is already provided by NVIDIA Container Toolkit.
|
apt-get install -y git cuda-nvcc-${CUDA_VERSION} cuda-libraries-${CUDA_VERSION} libcudnn8 && \
|
||||||
RUN apt install -y git cuda-nvcc-${CUDA_VERSION} cuda-libraries-${CUDA_VERSION} libcudnn8
|
apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Build stage: builds the release
|
# Build stage: builds the release
|
||||||
FROM base-${VARIANT} AS build
|
FROM base-${VARIANT} AS build
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade -y && \
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
build-essential git
|
build-essential git && \
|
||||||
|
apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -82,9 +83,7 @@ RUN apt-get update && apt-get upgrade -y && \
|
||||||
wget \
|
wget \
|
||||||
# In case someone uses Torchx for Nx
|
# In case someone uses Torchx for Nx
|
||||||
cmake && \
|
cmake && \
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
|
apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
apt-get clean -y && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Run in the /data directory by default, makes for a good place for
|
# Run in the /data directory by default, makes for a good place for
|
||||||
# the user to mount local volume
|
# the user to mount local volume
|
||||||
|
|
Loading…
Reference in a new issue