bep40 commited on
Commit
ffda644
·
verified ·
1 Parent(s): 46dbe57

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -12
Dockerfile CHANGED
@@ -1,20 +1,29 @@
1
- FROM python:3.12-slim
2
 
3
- WORKDIR /app
 
 
 
 
 
4
 
5
- RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg fonts-dejavu-core && rm -rf /var/lib/apt/lists/*
6
- RUN pip install --no-cache-dir fastapi uvicorn requests beautifulsoup4 jinja2 yt-dlp huggingface_hub gTTS pillow edge-tts python-dateutil httpx
7
 
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- COPY . .
 
 
 
 
 
 
 
12
 
13
- # Delete pycache to force reimport
14
- RUN rm -rf /app/*.pyc /app/__pycache__ /app/**/__pycache__ 2>/dev/null || true
15
 
16
  EXPOSE 7860
17
 
18
- CMD ["uvicorn", "app_v2_entry:app", "--host", "0.0.0.0", "--port", "7860"]
19
-
20
- # REBUILD TRIGGER: v5-stable-20260608
 
1
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2
 
3
+ RUN apt-get update && \
4
+ apt-get install -y \
5
+ bash git git-lfs wget curl procps \
6
+ htop vim nano jq tmux \
7
+ build-essential && \
8
+ rm -rf /var/lib/apt/lists/*
9
 
10
+ RUN uv pip install --system fastapi uvicorn python-multipart
 
11
 
12
+ RUN useradd -m -u 1000 user
13
+ USER user
14
 
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH \
17
+ PIP_USER=1 \
18
+ HF_HUB_DISABLE_PROGRESS_BARS=1 \
19
+ TQDM_DISABLE=1 \
20
+ HF_HUB_ENABLE_HF_TRANSFER=1 \
21
+ UV_NO_PROGRESS=1 \
22
+ PYTHONWARNINGS=ignore::DeprecationWarning
23
 
24
+ WORKDIR /app
25
+ COPY --chown=user . /app
26
 
27
  EXPOSE 7860
28
 
29
+ CMD ["python", "sandbox_server.py"]