Charuka66 commited on
Commit
7ea6abe
·
verified ·
1 Parent(s): 160521d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -18
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- # Use Python 3.9
2
- FROM python:3.9
3
-
4
- # Set working directory
5
- WORKDIR /code
6
-
7
- # Copy requirements and install them
8
- COPY ./requirements.txt /code/requirements.txt
9
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
-
11
- # Copy the app code
12
- COPY . /code
13
-
14
- # Create a writable directory for temp files (Crucial for Hugging Face)
15
- RUN mkdir -p /code/temp && chmod 777 /code/temp
16
-
17
- # Run the app
18
- CMD ["uvicorn", "main", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
1
+ # Use Python 3.9
2
+ FROM python:3.9
3
+
4
+ # Set working directory
5
+ WORKDIR /code
6
+
7
+ # Copy requirements and install them
8
+ COPY ./requirements.txt /code/requirements.txt
9
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
+
11
+ # Copy the app code
12
+ COPY . /code
13
+
14
+ # Create a writable directory for temp files (Crucial for Hugging Face)
15
+ RUN mkdir -p /code/temp && chmod 777 /code/temp
16
+
17
+ # Run the app
18
+ # OLD (Broken):
19
+ # CMD ["uvicorn", "main", "--host", "0.0.0.0", "--port", "7860"]
20
+
21
+ # NEW (Fixed):
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]