mojad121 commited on
Commit
cc88e6b
·
verified ·
1 Parent(s): 56d81d8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -2,6 +2,7 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
@@ -10,11 +11,16 @@ RUN apt-get update && apt-get install -y \
10
  libsndfile1 \
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
 
 
 
 
 
 
13
  COPY requirements.txt ./
14
  COPY src/ ./src/
15
 
16
- RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
17
-
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  EXPOSE 8501
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
 
11
  libsndfile1 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Create a writable cache directory
15
+ RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
16
+
17
+ ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
18
+ ENV HF_HOME=/app/.cache/huggingface
19
+ ENV TORCH_HOME=/app/.cache/torch
20
+
21
  COPY requirements.txt ./
22
  COPY src/ ./src/
23
 
 
 
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
26
  EXPOSE 8501