barttee commited on
Commit
302c855
·
verified ·
1 Parent(s): b765f47

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -1,16 +1,22 @@
1
  FROM python:3.11-slim
2
 
3
  # Set the working directory to the root
4
- WORKDIR /app
5
 
6
  # Copy application files to the root
7
- COPY . /app
8
 
9
  # Install dependencies
10
- RUN pip install --no-cache-dir torch flask transformers
 
 
 
 
 
 
11
 
12
  # Expose the port for the app
13
  EXPOSE 7860
14
 
15
  # Command to run app.py directly
16
- CMD ["python", "app.py"]
 
1
  FROM python:3.11-slim
2
 
3
  # Set the working directory to the root
4
+ WORKDIR /
5
 
6
  # Copy application files to the root
7
+ COPY . /
8
 
9
  # Install dependencies
10
+ RUN pip install --no-cache-dir flask transformers
11
+
12
+ # Set Hugging Face cache directory
13
+ ENV HF_HOME="/tmp/huggingface"
14
+
15
+ # Create the cache directory and set permissions
16
+ RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
17
 
18
  # Expose the port for the app
19
  EXPOSE 7860
20
 
21
  # Command to run app.py directly
22
+ CMD ["python", "app.py"]