File size: 602 Bytes
9f559c6 1a2fc88 9ae946d 9f559c6 1a2fc88 92c4439 1a2fc88 6f372fd 92c4439 6f372fd 92c4439 9f559c6 1cf2796 6f372fd 9f559c6 546c790 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use Python base image
FROM python:3.12.2
# Add a new user but do not switch yet
RUN useradd -m -u 1000 user
# Set working directory
WORKDIR /app
# Copy application code with correct ownership
COPY --chown=user . /app/
USER root
COPY requirements.txt requirements.txt
RUN apt-get update && apt-get install git -y
RUN pip3 install -r requirements.txt
RUN pip3 install "git+https://github.com/openai/whisper.git"
RUN apt-get update && apt-get install -y ffmpeg
COPY . .
# Expose port
EXPOSE 7860
# Start the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |