Spaces:
Sleeping
Sleeping
Download Dockerfile from Surrendra/Multimedia_FAPI: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/Surrendra/Multimedia_FAPI/resolve/refs%2Fpr%2F1/Dockerfile
- Command line
-
hf download hf://spaces/Surrendra/Multimedia_FAPI@refs/pr/1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Surrendra/Multimedia_FAPI/resolve/refs%2Fpr%2F1/Dockerfile
1.24 kB
| # For more information, please refer to https://aka.ms/vscode-docker-python | |
| FROM python:3-slim | |
| 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 /app | |
| # Install pip requirements | |
| RUN pip install --upgrade pip && pip install numpy | |
| RUN apt-get update && apt-get install -y ffmpeg | |
| COPY requirements.txt ./app/requirements.txt | |
| #COPY summarize_mp4_video.py /app/app.py | |
| RUN pip install --no-cache-dir --upgrade -r ./app/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 adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app | |
| USER appuser | |
| RUN pip install 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"] |