forked from boocmp/go-stt
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
32 changed files
with
1,128 additions
and
729 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
- main | ||
- dev | ||
- bentoml | ||
- replace-bentoml | ||
|
||
name: stt deployments | ||
jobs: | ||
|
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,81 +1,12 @@ | ||
# =========================================== | ||
# | ||
# THIS IS A GENERATED DOCKERFILE. DO NOT EDIT | ||
# | ||
# =========================================== | ||
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 | ||
|
||
# Block SETUP_BENTO_BASE_IMAGE | ||
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04 as base-container | ||
RUN apt update && apt install -y python3-pip | ||
|
||
ENV LANG=C.UTF-8 | ||
RUN pip install --upgrade pip | ||
RUN pip install --upgrade setuptools | ||
|
||
ENV LC_ALL=C.UTF-8 | ||
COPY . /app | ||
WORKDIR /app | ||
RUN pip install . | ||
|
||
ENV PYTHONIOENCODING=UTF-8 | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
|
||
ENV NVIDIA_VISIBLE_DEVICES=all | ||
|
||
|
||
USER root | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache | ||
RUN set -eux && \ | ||
apt-get update -y && \ | ||
apt-get install -q -y --no-install-recommends --allow-remove-essential \ | ||
ca-certificates gnupg2 bash build-essential libsndfile1 ffmpeg | ||
|
||
RUN \ | ||
set -eux && \ | ||
apt-get install -y --no-install-recommends --allow-remove-essential software-properties-common && \ | ||
# add deadsnakes ppa to install python | ||
add-apt-repository ppa:deadsnakes/ppa && \ | ||
apt-get update -y && \ | ||
apt-get install -y --no-install-recommends --allow-remove-essential curl python3.11 python3.11-dev python3.11-distutils | ||
|
||
RUN ln -sf /usr/bin/python3.11 /usr/bin/python3 && \ | ||
ln -sf /usr/bin/pip3.11 /usr/bin/pip3 | ||
|
||
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \ | ||
python3 get-pip.py && \ | ||
rm -rf get-pip.py | ||
|
||
# Block SETUP_BENTO_USER | ||
ARG BENTO_USER=bentoml | ||
ARG BENTO_USER_UID=1034 | ||
ARG BENTO_USER_GID=1034 | ||
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER | ||
|
||
ENV BENTOML_CONFIG=src/configuration.yaml | ||
ARG BENTO_PATH=/home/bentoml/bento | ||
ENV BENTO_PATH=$BENTO_PATH | ||
ENV BENTOML_HOME=/home/bentoml/ | ||
ENV BENTOML_DO_NOT_TRACK=True | ||
|
||
RUN mkdir $BENTO_PATH && chown bentoml:bentoml $BENTO_PATH -R | ||
WORKDIR $BENTO_PATH | ||
|
||
# Block SETUP_BENTO_COMPONENTS | ||
COPY --chown=bentoml:bentoml ./env/python ./env/python/ | ||
# install python packages with install.sh | ||
RUN bash -euxo pipefail /home/bentoml/bento/env/python/install.sh | ||
COPY --chown=bentoml:bentoml . ./ | ||
|
||
# Block SETUP_BENTO_ENTRYPOINT | ||
RUN rm -rf /var/lib/{apt,cache,log} | ||
# Default port for BentoServer | ||
EXPOSE 3000 | ||
|
||
# Expose Prometheus port | ||
EXPOSE 3001 | ||
|
||
RUN chmod +x /home/bentoml/bento/env/docker/entrypoint.sh | ||
|
||
USER bentoml | ||
|
||
RUN mkdir /home/bentoml/.cache | ||
RUN mkdir /home/bentoml/.cache/torch | ||
|
||
ENTRYPOINT [ "/home/bentoml/bento/env/docker/entrypoint.sh" ] | ||
CMD [ "python3", "-m", "uvicorn", "stt:app" ] |
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,14 +1,8 @@ | ||
.PHONY: all build docker serve-docker | ||
all: serve-docker | ||
|
||
build: | ||
python -m bentoml delete -y stt:git || true | ||
python -m bentoml build --version git src | ||
cp -R ~/bentoml/bentos/stt/git/* . | ||
|
||
docker: build | ||
docker build -t stt:latest . | ||
|
||
serve-docker: docker | ||
sudo chown -R 1034:1043 models | ||
docker run -it --rm -p 3000:3000 -v ./models/huggingface:/home/bentoml/.cache/huggingface stt:latest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.