File size: 1,298 Bytes
a4fb6cd
6cf6986
016d1c6
 
6cf6986
a4fb6cd
 
 
 
 
 
 
 
6cf6986
2a8e147
6cf6986
1f96849
6cf6986
a4fb6cd
6cf6986
dde080c
a4fb6cd
 
 
016d1c6
 
a4fb6cd
 
 
 
 
 
 
6cf6986
 
 
a4fb6cd
6cf6986
 
 
a4fb6cd
6cf6986
 
 
 
 
 
a4fb6cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM docker.io/nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04 AS builder

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
	git rsync \
	make build-essential libssl-dev zlib1g-dev \
	libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
	libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \
	ffmpeg libsm6 libxext6 cmake libgl1 \
	&& rm -rf /var/lib/apt/lists/* \
	&& git lfs install

RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

RUN uv venv --python 3.10 /opt/venv

WORKDIR /app
COPY requirements.txt .
RUN . /opt/venv/bin/activate && uv pip install -r requirements.txt

FROM docker.io/nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
	ffmpeg libsm6 libxext6 libgl1 \
	git-lfs \
	&& rm -rf /var/lib/apt/lists/*

RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"

WORKDIR /app

COPY --from=builder /opt/venv /opt/venv
COPY . .

RUN mkdir -p /app/processed_results
RUN mkdir -p /root/.cache/torch/hub/checkpoints

ENV PYTHONUNBUFFERED=1
ENV PROCESSED_RESULTS=/app/processed_results

EXPOSE 7860

CMD ["uv", "run", "app.py"]