mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-06 18:56:48 +00:00
- fix nvidia repo blocked by apt (sha1) (#845)
- use build cache for apt and uv - limit concurency for uv to prevent crashes with too many cores
This commit is contained in:
@@ -4,27 +4,31 @@ ENV PYTHONUNBUFFERED=1 \
|
|||||||
UV_LINK_MODE=copy \
|
UV_LINK_MODE=copy \
|
||||||
UV_NO_CACHE=1
|
UV_NO_CACHE=1
|
||||||
|
|
||||||
|
# patch until nvidia updates the sha1 repo
|
||||||
|
ADD sequoia.config /etc/crypto-policies/back-ends/sequoia.config
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN apt-get update \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gnupg \
|
gnupg \
|
||||||
wget \
|
wget
|
||||||
&& apt-get clean
|
|
||||||
# Add NVIDIA CUDA repo for Debian 12 (bookworm) and install cuDNN 9 for CUDA 12
|
# Add NVIDIA CUDA repo for Debian 12 (bookworm) and install cuDNN 9 for CUDA 12
|
||||||
ADD https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb /cuda-keyring.deb
|
ADD https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb /cuda-keyring.deb
|
||||||
RUN dpkg -i /cuda-keyring.deb \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
|
dpkg -i /cuda-keyring.deb \
|
||||||
&& rm /cuda-keyring.deb \
|
&& rm /cuda-keyring.deb \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
cuda-cudart-12-6 \
|
cuda-cudart-12-6 \
|
||||||
libcublas-12-6 \
|
libcublas-12-6 \
|
||||||
libcudnn9-cuda-12 \
|
libcudnn9-cuda-12 \
|
||||||
libcudnn9-dev-cuda-12 \
|
libcudnn9-dev-cuda-12
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
||||||
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
||||||
ENV PATH="/root/.local/bin/:$PATH"
|
ENV PATH="/root/.local/bin/:$PATH"
|
||||||
@@ -39,6 +43,13 @@ COPY ./app /app/app
|
|||||||
COPY ./main.py /app/
|
COPY ./main.py /app/
|
||||||
COPY ./runserver.sh /app/
|
COPY ./runserver.sh /app/
|
||||||
|
|
||||||
|
# prevent uv failing with too many open files on big cpus
|
||||||
|
ENV UV_CONCURRENT_INSTALLS=16
|
||||||
|
|
||||||
|
# first install
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
|
uv sync --compile-bytecode --locked
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["sh", "/app/runserver.sh"]
|
CMD ["sh", "/app/runserver.sh"]
|
||||||
|
|||||||
2
gpu/self_hosted/sequoia.config
Normal file
2
gpu/self_hosted/sequoia.config
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[hash_algorithms]
|
||||||
|
sha1 = "always"
|
||||||
Reference in New Issue
Block a user