Mr-Help commited on
Commit
a44538d
·
verified ·
1 Parent(s): e84abcc

Update Dockerfile

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