| |
| FROM python:3.10-slim |
|
|
| |
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| build-essential \ |
| pkg-config \ |
| libssl-dev \ |
| git \ |
| wget \ |
| xz-utils \ |
| mediainfo \ |
| && apt-get clean \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN FFMPEG_URL="https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n7.1-latest-linux64-gpl-7.1.tar.xz" && \ |
| wget "$FFMPEG_URL" -O ffmpeg.tar.xz && \ |
| tar -xf ffmpeg.tar.xz && \ |
| mv ./ffmpeg-n7.1-latest-linux64-gpl-7.1/bin/* /usr/local/bin/ && \ |
| rm -rf ffmpeg.tar.xz ffmpeg-n7.1-latest-linux64-gpl-7.1 |
|
|
| |
| RUN useradd -m -u 1000 user |
| USER user |
|
|
| |
| ENV HOME=/home/user |
| WORKDIR $HOME/app |
| ENV PATH="$HOME/.cargo/bin:$HOME/.local/bin:${PATH}" |
|
|
| |
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| RUN cargo install --git https://github.com/alexheretic/ab-av1 |
|
|
| COPY --chown=user ./requirements.txt . |
| RUN pip install --no-cache-dir --user -r requirements.txt |
|
|
| |
| COPY --chown=user ./app ./app |
| RUN mkdir -p data/uploads data/outputs data/logs |
|
|
| |
| EXPOSE 7860 |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|
|
|