Sergidev commited on
Commit
ac57245
1 Parent(s): 933256c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -1,10 +1,16 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  COPY . .
9
 
10
- CMD ["python", "app.py"]
 
1
+ FROM python:3.9
2
 
3
  WORKDIR /app
4
 
5
+ # Create a directory for the cache
6
+ RUN mkdir -p /app/cache && chmod 777 /app/cache
7
+
8
+ # Set the TRANSFORMERS_CACHE environment variable
9
+ ENV TRANSFORMERS_CACHE=/app/cache
10
+
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  COPY . .
15
 
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]