first pass
This commit is contained in:
27
templates/python/ml-pytorch/Dockerfile.template
Normal file
27
templates/python/ml-pytorch/Dockerfile.template
Normal file
@@ -0,0 +1,27 @@
|
||||
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}}"]
|
||||
Reference in New Issue
Block a user