Files
idea.llm.gitea.repo.docker.…/templates/python/ml-pytorch/Dockerfile.template
2026-01-26 22:33:55 -06:00

28 lines
542 B
Docker

FROM python:{{PYTHON_VERSION}}-slim
# Install system dependencies for ML libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
libsndfile1 \
ffmpeg \
libavcodec-extra \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . .
# Set environment
ENV PYTHONUNBUFFERED=1
ENV PORT={{PORT}}
EXPOSE {{PORT}}
CMD ["python", "{{ENTRY_POINT}}"]