Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829
FROM python:3.12
# Install FFmpegRUN apt-get update && apt-get install -y ffmpeg
# Create a non - root userRUN useradd -m -u 1000 userUSER userENV PATH="/home/user/.local/bin:$PATH"
# Set the working directoryWORKDIR /app
# Copy the requirements fileCOPY --chown=user ./requirements.txt requirements.txt
# Install Python dependenciesRUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy all other files to the working directoryCOPY --chown=user . /app
# Set appropriate permissions for all files and directories in the appRUN find /app -type f -exec chmod 644 {} \; && \ find /app -type d -exec chmod 755 {} \;
# Start the application using UvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]DockerfileAdded+29