-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
440c93f
commit 39d1eef
Showing
2 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
FROM tiangolo/uvicorn-gunicorn:python3.11 | ||
FROM python:3.11 AS builder | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl | ||
RUN apt-get install unzip | ||
RUN apt-get -y install python3 | ||
RUN apt-get -y install python3-pip | ||
RUN apt-get -y install git | ||
RUN apt-get -y install ffmpeg | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
RUN python -m venv /opt/venv | ||
|
||
COPY plugins/example/requirements.txt /tmp/requirements.txt | ||
RUN pip install --no-cache-dir -r /tmp/requirements.txt | ||
|
||
COPY plugins/example/ /app | ||
FROM python:3.11-slim | ||
|
||
WORKDIR /app | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
RUN apt-get update && apt-get -y install ffmpeg curl unzip && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=builder /opt/venv /opt/venv | ||
COPY plugins/example/ . | ||
|
||
EXPOSE 8080 | ||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] | ||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] |