forked from BigDataIA-Fall2024-TeamA2/Assignment2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrontend.Dockerfile
More file actions
31 lines (22 loc) · 746 Bytes
/
Copy pathfrontend.Dockerfile
File metadata and controls
31 lines (22 loc) · 746 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
# Use an official Python runtime as a parent image
FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt /app/
# Install the dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copy the frontend directory into the container
COPY frontend /app/frontend
COPY app.py /app/app.py
# Expose the default Streamlit port
EXPOSE 8501
# Set Streamlit-specific environment variables
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_HEADLESS=true
# Run the Streamlit app
CMD ["streamlit", "run", "app.py"]