Anjali04-15 commited on
Commit
c2a07d1
·
verified ·
1 Parent(s): c486b6e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -1,15 +1,18 @@
 
1
  FROM python:3.10-slim
2
 
3
- # Create app directory
4
  WORKDIR /app
5
- COPY fruit-model /app/fruit-model
6
 
 
 
 
7
 
8
- # Copy source files
9
  COPY . .
10
 
11
- # Install dependencies
12
- RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Run the FastAPI app using uvicorn
15
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use official Python image as base
2
  FROM python:3.10-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
 
6
 
7
+ # Copy requirements and install
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy app files
12
  COPY . .
13
 
14
+ # Expose port 7860 (default for HF Spaces)
15
+ EXPOSE 7860
16
 
17
+ # Command to run your FastAPI app with Uvicorn
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]