-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 936 Bytes
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 936 Bytes
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
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
# System dependencies
RUN apt-get update && apt-get install -y \
python3.11 \
python3.11-venv \
python3-pip \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
git \
&& rm -rf /var/lib/apt/lists/*
RUN ln -sf /usr/bin/python3.11 /usr/bin/python3 && \
ln -sf /usr/bin/python3.11 /usr/bin/python
WORKDIR /app
# Copy source code first (needed for editable install)
COPY pyproject.toml .
COPY landmarkdiff/ landmarkdiff/
COPY scripts/ scripts/
COPY configs/ configs/
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir ".[app]"
# Pre-download MediaPipe model on build
RUN python -c "import mediapipe" 2>/dev/null || true
EXPOSE 7860
# Default: launch Gradio demo
CMD ["python", "scripts/app.py", "--server_name", "0.0.0.0"]