의존성 추가
This commit is contained in:
11
dockerfile
11
dockerfile
@@ -1,30 +1,19 @@
|
||||
# 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"]
|
||||
|
||||
Reference in New Issue
Block a user