vaibhaviiii28 commited on
Commit
1046295
·
verified ·
1 Parent(s): 200f004

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -12
Dockerfile CHANGED
@@ -1,23 +1,20 @@
1
- # Use an official Python image
2
  FROM python:3.10
3
 
4
- # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Copy the requirements file first (for caching optimization)
8
- COPY requirements.txt /app/requirements.txt
9
 
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy all other application files
14
  COPY . .
15
 
16
- # Give execution permission to the startup script
17
- RUN chmod +x start0.sh
18
 
19
- # Expose the port used by Hugging Face Spaces (7860) or Cloud Run (8000)
20
- EXPOSE 8000
21
-
22
- # Run the app using the startup script
23
- CMD ["./start0.sh"]
 
1
+ # Use an official lightweight Python image
2
  FROM python:3.10
3
 
4
+ # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file
8
+ COPY requirements.txt .
9
 
10
  # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy all application files
14
  COPY . .
15
 
16
+ # Expose the required port for Hugging Face (7860)
17
+ EXPOSE 7860
18
 
19
+ # Run FastAPI using Uvicorn
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]