Some checks failed
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Failing after 2m42s
Build Worker Base and Application Images / build-docker (push) Has been skipped
Build Worker Base and Application Images / deploy-stack (push) Has been skipped
24 lines
No EOL
683 B
Text
24 lines
No EOL
683 B
Text
# Base image with all ML dependencies
|
|
FROM pytorch/pytorch:2.8.0-cuda12.6-cudnn9-runtime
|
|
|
|
# Install system dependencies
|
|
RUN apt update && apt install -y \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
libgthread-2.0-0 \
|
|
libgstreamer1.0-0 \
|
|
libgtk2.0-0 \
|
|
libavcodec-dev \
|
|
libavformat-dev \
|
|
libswscale-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy and install base requirements (ML dependencies that rarely change)
|
|
COPY requirements.base.txt .
|
|
RUN pip install --no-cache-dir -r requirements.base.txt
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# This base image will be reused for all worker builds
|
|
CMD ["python3", "-m", "fastapi", "run", "--host", "0.0.0.0", "--port", "8000"] |