mac9087 commited on
Commit
a710aa3
·
verified ·
1 Parent(s): 228dc8e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- # Use Python base image
2
  FROM python:3.10-slim
3
 
4
- # Set workdir
5
  WORKDIR /app
6
 
 
7
  ENV NUMBA_CACHE_DIR=/tmp
8
  ENV NUMBA_DISABLE_CACHE=1
 
 
 
 
9
 
10
- # Copy files
11
- COPY requirements.txt requirements.txt
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- COPY app.py app.py
15
 
16
- # Expose port
17
  EXPOSE 7860
18
 
19
- # Run the app
20
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Fixes for permission errors
6
  ENV NUMBA_CACHE_DIR=/tmp
7
  ENV NUMBA_DISABLE_CACHE=1
8
+ ENV HF_HOME=/tmp/huggingface
9
+ ENV TRANSFORMERS_CACHE=/tmp/huggingface/transformers
10
+ ENV TORCH_HOME=/tmp/torch
11
+ ENV XDG_CACHE_HOME=/tmp
12
 
13
+ COPY requirements.txt .
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ COPY app.py .
17
 
 
18
  EXPOSE 7860
19
 
 
20
  CMD ["python", "app.py"]