idkash1 commited on
Commit
b0c4302
·
verified ·
1 Parent(s): 446f3d2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -7,6 +7,17 @@ WORKDIR /app
7
  # Copy the requirements file
8
  COPY requirements.txt .
9
 
 
 
 
 
 
 
 
 
 
 
 
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
@@ -17,4 +28,4 @@ COPY . .
17
  EXPOSE 5000
18
 
19
  # Run the application
20
- CMD ["python", "app.py"]
 
7
  # Copy the requirements file
8
  COPY requirements.txt .
9
 
10
+ # Change permission
11
+ RUN mkdir -p /cache/huggingface /cache/matplotlib \
12
+ && chmod -R 777 /cache/huggingface /cache/matplotlib
13
+
14
+ # Set environment variables for Hugging Face and Matplotlib
15
+ ENV HF_HOME=/cache/huggingface
16
+ ENV MPLCONFIGDIR=/cache/matplotlib
17
+
18
+ # Flask
19
+ ENV FLASK_APP=app.py
20
+
21
  # Install dependencies
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
 
28
  EXPOSE 5000
29
 
30
  # Run the application
31
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]