-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 927 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 927 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
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies required for some Python packages
RUN apt-get update && apt-get install -y build-essential libgl1 git && \
rm -rf /var/lib/apt/lists/*
# Copy the dependencies file to the working directory
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --default-timeout=100 -r requirements.txt
# Copy the rest of the project files to the working directory
COPY . .
# Set environment variables for the container
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
# Add the project root to Python's module search path
ENV PYTHONPATH="/app"
# Command to run the Streamlit application
CMD ["streamlit", "run", "app/streamlit_app.py", "--server.port", "8080", "--server.address", "0.0.0.0", "--server.enableCORS", "false"]