Tiko / Dockerfile
Mxltic's picture
Update Dockerfile
cf8629e verified
raw
history blame contribute delete
555 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -u 1000 appuser \
&& chown -R appuser:appuser /app
# Copy the main loader script
COPY --chown=appuser:appuser app.py .
COPY --chown=appuser:appuser requirements.txt .
# Switch to non-root user
USER appuser
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]