-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·33 lines (23 loc) · 791 Bytes
/
Dockerfile
File metadata and controls
executable file
·33 lines (23 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Python runtime as a parent image
FROM python:3.8-slim
# Working directory
WORKDIR /app
# Create the necessary directories
RUN mkdir -p /app/ /app/models
# Copy the files from your host machine into the container
COPY app.py /app/
COPY requirements.txt /app/
COPY models/ /app/models/
# Update the repositories and install Java for H20.ai AutoML
RUN apt-get update && \
apt-get install -y default-jre && \
apt-get clean;
# Create and activate a virtual environment
RUN python -m venv venv
RUN /bin/bash -c "source venv/bin/activate"
# Install requirements.txt
RUN pip install -r requirements.txt
# Make port 8501 available to the world outside this container
EXPOSE 8501
# Define the default command to run your Streamlit application
CMD ["streamlit", "run", "app.py"]