YALCINKAYA commited on
Commit
7c8555b
·
1 Parent(s): 1e6ac26

set up cache in dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -1,9 +1,16 @@
1
- # Use the official Python image
2
  FROM python:3.9-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
 
 
 
 
 
 
 
7
  # Copy the requirements file into the image
8
  COPY requirements.txt requirements.txt
9
 
 
1
+ # Use the official Python image
2
  FROM python:3.9-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Create a writable cache directory for Hugging Face
8
+ RUN mkdir -p /workspace/huggingface_cache && \
9
+ chmod -R 777 /workspace/huggingface_cache
10
+
11
+ # Set environment variable for Hugging Face cache
12
+ ENV HF_HOME=/workspace/huggingface_cache
13
+
14
  # Copy the requirements file into the image
15
  COPY requirements.txt requirements.txt
16