SHASWATSINGH3101 commited on
Commit
c618b6f
1 Parent(s): 224a5e3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -7,8 +7,8 @@ WORKDIR /app
7
  # Copy the current directory contents into the container at /app
8
  COPY . /app
9
 
10
- # Create a directory for the cache and set permissions
11
- RUN mkdir -p /app/.cache && chmod 777 /app/.cache
12
 
13
  # Install any needed packages specified in requirements.txt
14
  RUN pip install --no-cache-dir -r requirements.txt
@@ -16,8 +16,8 @@ RUN pip install --no-cache-dir -r requirements.txt
16
  # Make port 7860 available to the world outside this container
17
  EXPOSE 7860
18
 
19
- # Set environment variable for the cache directory
20
- ENV TRANSFORMERS_CACHE=/app/.cache
21
 
22
  # Run app.py when the container launches
23
  CMD ["python", "app.py"]
 
7
  # Copy the current directory contents into the container at /app
8
  COPY . /app
9
 
10
+ # Create directories for the cache and flagged data, and set permissions
11
+ RUN mkdir -p /app/.cache /app/flagged && chmod 777 /app/.cache /app/flagged
12
 
13
  # Install any needed packages specified in requirements.txt
14
  RUN pip install --no-cache-dir -r requirements.txt
 
16
  # Make port 7860 available to the world outside this container
17
  EXPOSE 7860
18
 
19
+ # Set environment variable for the Hugging Face home directory
20
+ ENV HF_HOME=/app/.cache
21
 
22
  # Run app.py when the container launches
23
  CMD ["python", "app.py"]