Bhatiasab commited on
Commit
1574be2
·
verified ·
1 Parent(s): d797a6d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -5
Dockerfile CHANGED
@@ -1,10 +1,18 @@
1
- FROM python:3.10
 
2
 
3
- WORKDIR /app
 
4
 
 
 
 
 
 
5
  COPY . .
6
 
7
- RUN pip install --no-cache-dir -r requirements.txt
 
8
 
9
- # Pinger aur Uvicorn dono ko ek saath chala rahe hain
10
- CMD ["sh", "-c", "python pinger.py & uvicorn app:app --host 0.0.0.0 --port 7860"]
 
1
+ # Use a slim Python image
2
+ FROM python:3.9-slim
3
 
4
+ # Set the working directory
5
+ WORKDIR /code
6
 
7
+ # Copy your 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 your application code
12
  COPY . .
13
 
14
+ # Expose port 7860 (Hugging Face requirement)
15
+ EXPOSE 7860
16
 
17
+ # Command to run your FastAPI app
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]