Spaces:
Sleeping
Sleeping
File size: 1,790 Bytes
9d29c77 a9c0f81 9d29c77 f51db55 9d29c77 a7af605 5a3cd56 f51db55 9d29c77 f51db55 a7af605 9d29c77 f51db55 9d29c77 337fdf8 e84e8d9 f51db55 14f8f53 f51db55 | 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.13
EXPOSE 8000
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
WORKDIR /code
# Install pip requirements
RUN pip install --upgrade pip && pip install numpy
RUN apt-get update && apt-get install -y ffmpeg
RUN pip install --no-cache-dir imageio_ffmpeg
COPY requirements.txt ./code/requirements.txt
#COPY summarize_mp4_video.py /app/app.py
RUN pip install --no-cache-dir --upgrade -r ./code/requirements.txt
# COPY . /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN useradd user
#RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
## Start the FASTAPI App on port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
#RUN pip install --no-cache-dir gunicorn
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
#CMD ["/home/appuser/.local/bin/gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "setup:app"]
#CMD ["python", "-m", "gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "setup:app"]
#RUN chmod +x /home/appuser/.local/bin/gunicorn
#CMD ["/home/appuser/.local/bin/gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "app:app"]
#CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "app:app"] |