oleh13 commited on
Commit
4aa2c25
·
verified ·
1 Parent(s): f73086f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ COPY requirements.txt /app/requirements.txt
11
+
12
+ RUN pip install --no-cache-dir --upgrade pip
13
+ RUN pip install --no-cache-dir -r /app/requirements.txt
14
+
15
+ COPY app.py /app/app.py
16
+
17
+ ENV HF_HOME=/data/.cache/huggingface
18
+ ENV TRANSFORMERS_CACHE=/data/.cache/huggingface
19
+
20
+ EXPOSE 7860
21
+
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]