bulk / Dockerfile
Chrunos's picture
Create Dockerfile
89de18a verified
raw
history blame contribute delete
750 Bytes
FROM python:3.12
# Install FFmpeg
RUN apt-get update && apt-get install -y ffmpeg
# Create a non - root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory
WORKDIR /app
# Copy the requirements file
COPY --chown=user ./requirements.txt requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy all other files to the working directory
COPY --chown=user . /app
# Set appropriate permissions for all files and directories in the app
RUN find /app -type f -exec chmod 644 {} \; && \
find /app -type d -exec chmod 755 {} \;
# Start the application using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]