File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Use an official Python runtime as a parent image
22FROM python:3.11-slim
33
4+ # 기본 Python 런타임 환경 변수
5+ ENV PYTHONDONTWRITEBYTECODE=1 \
6+ PYTHONUNBUFFERED=1 \
7+ TZ=Asia/Seoul \
8+ VIRTUAL_ENV=/app/.venv \
9+ PATH="/app/.venv/bin:${PATH}"
10+
411# Set the working directory in the container
512WORKDIR /app
613
714# Install tzdata and set timezone to Asia/Seoul
815RUN apt-get update && \
9- apt-get install -y --no-install-recommends tzdata && \
16+ apt-get install -y --no-install-recommends tzdata libgl1 libglib2.0-0 && \
1017 ln -snf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
1118 echo "Asia/Seoul" > /etc/timezone && \
1219 apt-get clean && rm -rf /var/lib/apt/lists/*
1320
14- ENV TZ=Asia/Seoul
21+ # install uv for improved package management
22+ RUN pip install --no-cache-dir "uv>=0.5.0"
1523
16- # Copy the dependency files
17- COPY requirements.txt .
18- COPY uv.lock .
24+ # Copy only the dependency files to leverage Docker cache
25+ COPY pyproject.toml uv.lock ./
1926
20- # Install any needed packages specified in requirements.txt
21- # Using uv pip install for faster and more reliable dependency management
22- RUN pip install uv && uv pip install --system -r requirements.txt
27+ # Install the dependencies into the project virtualenv
28+ RUN uv sync --frozen
2329
2430# Copy the rest of the application code
2531COPY . .
Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ readme = "README.md"
66requires-python = " >=3.11"
77dependencies = [
88 " aiohttp>=3.12.15" ,
9- " dotenv>=0.9.9 " ,
9+ " aiosmtplib>=4.0.1 " ,
1010 " fastapi>=0.109.1" ,
11+ " gunicorn>=21.2.0" ,
1112 " invisible-watermark>=0.2.0" ,
12- " opencv-python>=4.11.0.86" ,
13+ " opencv-python-headless >=4.11.0.86" ,
1314 " pillow>=10.1.0" ,
1415 " pydantic>=2.5.3" ,
1516 " pydantic-settings>=2.1.0" ,
@@ -23,5 +24,4 @@ dependencies = [
2324
2425[dependency-groups ]
2526dev = [
26- " aiosmtplib>=4.0.1" ,
2727]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments