1MR commited on
Commit
1709bcd
·
verified ·
1 Parent(s): 0ea3bba

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python image as a base
2
+ FROM python:3.9-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE 1
6
+ ENV PYTHONUNBUFFERED 1
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Copy the FastAPI app and model
12
+ COPY . /app
13
+
14
+ # Install required libraries
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Expose the port for the app
18
+ EXPOSE 8000
19
+
20
+ # Command to run the app
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]