ayf3 commited on
Commit
973e473
·
verified ·
1 Parent(s): 653c8b1

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -16
Dockerfile CHANGED
@@ -1,27 +1,17 @@
1
  FROM python:3.11-slim
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
- ffmpeg \
5
- libsndfile1 \
6
- && rm -rf /var/lib/apt/lists/*
7
-
8
- RUN useradd -m -u 1000 user
9
-
10
- ENV HOME=/home/user \
11
- PATH=/home/user/.local/bin:$PATH \
12
- PYTHONUNBUFFERED=1 \
13
- PYTHONIOENCODING=UTF-8 \
14
- HF_HOME=/home/user/.cache/huggingface \
15
- PORT=7860
16
-
17
- WORKDIR /home/user/app
18
 
 
19
  COPY requirements.txt .
20
- RUN pip install --no-cache-dir --upgrade pip && \
21
- pip install --no-cache-dir -r requirements.txt
22
 
23
  COPY app.py .
24
 
25
  USER user
 
 
26
 
27
  CMD ["python", "app.py"]
 
1
  FROM python:3.11-slim
2
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ git ffmpeg libsndfile1 && \
5
+ rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
+ WORKDIR /app
8
  COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
 
10
 
11
  COPY app.py .
12
 
13
  USER user
14
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
15
+ EXPOSE 7860
16
 
17
  CMD ["python", "app.py"]