37 lines
838 B
Docker
37 lines
838 B
Docker
FROM python:3.12-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Set environment variables
|
|
#ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
# PYTHONUNBUFFERED=1 \
|
|
# STREAMLIT_SERVER_PORT=8501 \
|
|
# STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
ARG PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
STREAMLIT_SERVER_PORT=8501 \
|
|
STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
|
|
# Install system dependencies
|
|
#RUN apt-get update && \
|
|
# apt-get install -y --no-install-recommends \
|
|
# build-essential \
|
|
# curl \
|
|
# && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements first to leverage Docker cache
|
|
COPY requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the application code
|
|
COPY . .
|
|
|
|
# Expose the port Streamlit runs on
|
|
EXPOSE 8501
|
|
|
|
# Command to run the application
|
|
CMD ["streamlit", "run", "app.py"]
|