adithimshrouthy commited on
Commit
a72f2ea
·
verified ·
1 Parent(s): f3e93f5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -3,6 +3,8 @@ FROM python:3.10-slim
3
  # system deps (optional, e.g. git)
4
  RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
5
 
 
 
6
  WORKDIR /app
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
@@ -10,7 +12,9 @@ RUN pip install --no-cache-dir -r requirements.txt
10
  COPY app.py .
11
 
12
  EXPOSE 7860
13
- ENV HF_HOME=/root/.cache/huggingface
14
- ENV TRANSFORMERS_CACHE=/root/.cache/huggingface
 
 
15
 
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # system deps (optional, e.g. git)
4
  RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
5
 
6
+
7
+
8
  WORKDIR /app
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
 
12
  COPY app.py .
13
 
14
  EXPOSE 7860
15
+ ENV HF_HOME=/app/hf-cache
16
+ ENV TRANSFORMERS_CACHE=/app/hf-cache
17
+ RUN mkdir -p /app/hf-cache && chmod -R 777 /app/hf-cache
18
+
19
 
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]