This commit is contained in:
2025-09-03 17:33:18 +09:00
parent 9d436cd592
commit e2b8375cac
8 changed files with 526 additions and 0 deletions

30
dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# Use a more complete Python runtime as a parent image to avoid missing system libraries
FROM python:3.12
# Install system dependencies required by OpenCV
RUN apt-get update && apt-get install -y libgl1 && rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Install uv
RUN pip install uv
# Copy the dependency files
COPY pyproject.toml uv.lock ./
# Install dependencies using uv
# Note: We use the lock file for reproducible builds
RUN uv pip sync uv.lock --no-cache --system
# Copy the rest of the application's code
COPY . .
# Expose the port that Streamlit runs on
EXPOSE 8502
# Set the healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8502/_stcore/health
# Command to run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=8502", "--server.address=0.0.0.0"]