namanraj commited on
Commit
5725093
·
verified ·
1 Parent(s): 02ef8b7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -14
Dockerfile CHANGED
@@ -1,14 +1,22 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /code
4
-
5
- # Install dependencies
6
- COPY requirements.txt .
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- # Copy app code + model
10
- COPY ./app ./app
11
-
12
- EXPOSE 7860
13
-
14
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
1
+ # Base Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /code
6
+
7
+ # Copy dependencies first for caching
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy app folder (includes main.py + best_model.h5)
12
+ COPY ./app ./app
13
+
14
+ # Set working directory to app
15
+ WORKDIR /code/app
16
+
17
+ # Expose Hugging Face Space port
18
+ EXPOSE 7860
19
+
20
+ # Start FastAPI app
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
22
+