rasmodev commited on
Commit
f7097fa
·
verified ·
1 Parent(s): 49a852e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a Python base image
2
+ FROM python:3.9-slim-buster
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install the dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the saved model and key components
14
+ # You'll need to upload 'model_and_key_components.pkl' to the same directory as your app.py
15
+ COPY model_and_key_components.pkl .
16
+
17
+ # Copy the Streamlit application
18
+ COPY app.py .
19
+
20
+ # Expose the port Streamlit runs on
21
+ EXPOSE 7860
22
+
23
+ # Command to run the Streamlit application
24
+ CMD ["streamlit", "run", "app.py"]