shivam98 commited on
Commit
aec53ab
·
verified ·
1 Parent(s): be918ee

Update Dockerfile

Browse files

remove depricated method

Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -2,21 +2,25 @@ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV TZ=Etc/UTC
5
- ENV TRANSFORMERS_CACHE=/app/cache
6
 
7
  WORKDIR /app
8
 
 
9
  RUN apt-get update && apt-get install -y \
10
  ffmpeg \
11
  git \
12
  tzdata \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- RUN mkdir -p /app/cache
 
16
 
 
17
  COPY requirements.txt .
18
  RUN pip install --upgrade pip && pip install -r requirements.txt
19
 
 
20
  COPY main.py .
21
 
22
  EXPOSE 7860
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV TZ=Etc/UTC
5
+ ENV HF_HOME=/data/huggingface # <-- use this instead of TRANSFORMERS_CACHE
6
 
7
  WORKDIR /app
8
 
9
+ # Install dependencies
10
  RUN apt-get update && apt-get install -y \
11
  ffmpeg \
12
  git \
13
  tzdata \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Create Hugging Face cache folder in writable space
17
+ RUN mkdir -p /data/huggingface
18
 
19
+ # Install Python packages
20
  COPY requirements.txt .
21
  RUN pip install --upgrade pip && pip install -r requirements.txt
22
 
23
+ # Copy app code
24
  COPY main.py .
25
 
26
  EXPOSE 7860