kouki321 commited on
Commit
2fc13f2
·
verified ·
1 Parent(s): a8a3937

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -6
Dockerfile CHANGED
@@ -1,21 +1,18 @@
1
  FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
2
 
3
- # Install system packages
4
  RUN apt-get update && apt-get install -y \
5
  python3 python3-pip git && \
6
  ln -s /usr/bin/python3 /usr/bin/python
7
 
8
- # Install Python libraries
9
  COPY requirements.txt .
10
  RUN pip install --upgrade pip
11
  RUN pip install -r requirements.txt
12
 
13
- # Copy the app
14
  WORKDIR /app
 
 
 
15
  COPY app.py .
16
 
17
- # Expose the port required by Hugging Face Spaces or your own server
18
  EXPOSE 7860
19
-
20
- # Run FastAPI app
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  python3 python3-pip git && \
5
  ln -s /usr/bin/python3 /usr/bin/python
6
 
 
7
  COPY requirements.txt .
8
  RUN pip install --upgrade pip
9
  RUN pip install -r requirements.txt
10
 
 
11
  WORKDIR /app
12
+ ENV TRANSFORMERS_CACHE=/app/cache
13
+ RUN mkdir -p /app/cache
14
+
15
  COPY app.py .
16
 
 
17
  EXPOSE 7860
 
 
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]