ParthSadaria commited on
Commit
0becfe3
·
verified ·
1 Parent(s): eb38c26

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -10
Dockerfile CHANGED
@@ -1,23 +1,21 @@
1
- # Use the official Python image as the base image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install dependencies
8
  COPY requirements.txt .
9
-
10
- # Install dependencies from requirements.txt
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy all other files into the container
14
  COPY . .
15
 
16
- # Expose the port where the app will run
17
- EXPOSE 8000
18
 
19
- # Set environment variables if necessary
20
  ENV PATH="/app:${PATH}"
21
 
22
- # Command to run FastAPI app with Uvicorn
23
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use the official Python image as the base
2
  FROM python:3.10-slim
3
 
4
+ # Set working dir
5
  WORKDIR /app
6
 
7
+ # Copy & install deps
8
  COPY requirements.txt .
 
 
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Copy app files
12
  COPY . .
13
 
14
+ # Expose the same port you run on
15
+ EXPOSE 7860
16
 
17
+ # Make sure PATH includes /app
18
  ENV PATH="/app:${PATH}"
19
 
20
+ # Run FastAPI via Uvicorn on port 7860
21
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]