D-Jaden02 commited on
Commit
f96c3fd
·
verified ·
1 Parent(s): 9bc7af0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # HF Spaces requires user 1000
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+
7
+ ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH \
9
+ PYTHONUNBUFFERED=1
10
+
11
+ WORKDIR $HOME/app
12
+
13
+ COPY --chown=user requirements.txt .
14
+ RUN pip install --no-cache-dir --upgrade pip && \
15
+ pip install --no-cache-dir -r requirements.txt
16
+
17
+ COPY --chown=user app.py .
18
+
19
+ EXPOSE 7860
20
+
21
+ CMD ["python", "app.py"]