deepang1902 commited on
Commit
496c963
·
verified ·
1 Parent(s): ece0c16

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -1,6 +1,11 @@
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
 
 
 
 
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
@@ -10,7 +15,6 @@ COPY requirements.txt .
10
  # Install the Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # --- ADD THIS LINE ---
14
  # Pre-download the NLTK 'punkt' tokenizer during the build process
15
  RUN python -m nltk.downloader punkt
16
 
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
+ # --- ADD THIS LINE ---
5
+ # Set the Hugging Face cache directory to a writable location.
6
+ # This prevents permission errors when the model is downloaded.
7
+ ENV HF_HOME /tmp
8
+
9
  # Set the working directory in the container
10
  WORKDIR /code
11
 
 
15
  # Install the Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
18
  # Pre-download the NLTK 'punkt' tokenizer during the build process
19
  RUN python -m nltk.downloader punkt
20