dubaif5/sora2api
0
1FROM python:3.11-slim2 3WORKDIR /app4 5# Create a non-root user with ID 10006RUN useradd -m -u 1000 user7 8# Create necessary directories and set permissions9# We need to ensure /app/data and /app/tmp exist and are writable by the user10RUN mkdir -p /app/data /app/tmp && \11 chown -R user:user /app12 13# Switch to the non-root user14USER user15 16# Set environment variables17ENV PATH="/home/user/.local/bin:$PATH"18ENV PYTHONUNBUFFERED=119 20# Copy requirements first to leverage cache21COPY --chown=user:user requirements.txt .22 23# Install dependencies24RUN pip install --no-cache-dir -r requirements.txt25 26# Copy the rest of the application27COPY --chown=user:user . .28 29# Expose the port30EXPOSE 786031 32# Run the application33CMD ["python", "main.py"]34 