-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate speech models to GCP Compute engine
- Loading branch information
1 parent
58e8680
commit ff1e123
Showing
2 changed files
with
27 additions
and
19 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 backend/requirements.txt /tmp/requirements.txt | ||
RUN pip install --no-cache-dir -r /tmp/requirements.txt | ||
|
||
COPY backend/modal/ /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 backend/modal/ . | ||
|
||
EXPOSE 8080 | ||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] | ||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"] |