sujoy0011 commited on
Commit
4d9e8a2
·
verified ·
1 Parent(s): 94c5399

Update Dockerfile

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