Terence9 commited on
Commit
5580d59
·
verified ·
1 Parent(s): 5e907f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -7
Dockerfile CHANGED
@@ -1,21 +1,17 @@
1
- # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory in the container
5
  WORKDIR /code
6
 
7
- # Copy requirements.txt and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy the rest of your application code
12
  COPY . .
13
 
14
- # Expose the port (7860 is the default for Hugging Face Spaces, change if needed)
 
 
15
  EXPOSE 7860
16
 
17
- # Set environment variable for Flask (if using Flask)
18
  ENV FLASK_APP=app.py
19
 
20
- # Start the app (adjust if you use FastAPI, etc.)
21
  CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /code
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
10
+ # Create uploads directory with write permissions
11
+ RUN mkdir -p /code/uploads && chmod 777 /code/uploads
12
+
13
  EXPOSE 7860
14
 
 
15
  ENV FLASK_APP=app.py
16
 
 
17
  CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]