Spaces:
Build error
Build error
Create Dockerfile
Browse files- 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"]
|