rasmodev commited on
Commit
c8fed91
1 Parent(s): 9589116

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python image as a parent image
2
+ FROM python:3.11.3-slim
3
+
4
+ # Set the working directory within the container
5
+ WORKDIR /app
6
+
7
+ # Copy your FastAPI application code into the container
8
+ COPY ./src/app.py /app
9
+
10
+ # Copy the model and key components into the container
11
+ COPY ./model_and_key_components.pkl /app
12
+
13
+ # Copy the requirements.txt file into the container
14
+ COPY ./requirements.txt /app
15
+
16
+ # Install the Python dependencies
17
+ RUN pip install -r /app/requirements.txt
18
+
19
+ # Expose port 8000 for the FastAPI application
20
+ EXPOSE 8000
21
+
22
+ # Define the command to run your FastAPI application
23
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]