rasmodev commited on
Commit
a8f4f3a
·
1 Parent(s): ed178d7

Create 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 the requirements.txt file into the container
8
+ COPY ./requirements.txt /app/requirements.txt
9
+
10
+ # Install the Python dependencies
11
+ RUN pip install -r /app/requirements.txt
12
+
13
+ # Copy your FastAPI application code into the container
14
+ COPY ./main.py /app/main.py
15
+
16
+ # Copy the model and key components into the container
17
+ COPY ./model_and_key_components.pkl /app/model_and_key_components.pkl
18
+
19
+ # Expose port 7860 for the FastAPI application
20
+ EXPOSE 7860
21
+
22
+ # Define the command to run your FastAPI application
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]