FlameF0X commited on
Commit
6f1681e
·
verified ·
1 Parent(s): 19bdc3f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ ffmpeg libsndfile1 \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH \
11
+ HF_HOME=/home/user/.cache/huggingface \
12
+ PYTHONUNBUFFERED=1
13
+
14
+ WORKDIR /home/user/app
15
+
16
+ COPY --chown=user requirements.txt .
17
+ RUN pip install --no-cache-dir --upgrade pip \
18
+ && pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \
19
+ && pip install --no-cache-dir -r requirements.txt
20
+
21
+ COPY --chown=user app.py .
22
+
23
+ CMD ["python", "app.py"]