itazap HF Staff commited on
Commit
a30a5c7
·
verified ·
1 Parent(s): 4340743

Add Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ ENV PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ HF_HUB_DISABLE_PROGRESS_BARS=1 \
8
+ TRANSFORMERS_VERBOSITY=error
9
+
10
+ COPY requirements.txt /app/requirements.txt
11
+ RUN pip install --no-cache-dir -r /app/requirements.txt
12
+
13
+ COPY app /app/app
14
+ COPY static /app/static
15
+
16
+ EXPOSE 7860
17
+
18
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]