Skip to content

Commit

Permalink
fix: 🐛 move wget model to entrypoint.sh and actions/runner-images#284…
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacoppari committed Dec 3, 2024
1 parent 4d0d18d commit b29726f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ COPY poetry.lock pyproject.toml ./
RUN poetry config virtualenvs.in-project true
RUN poetry install --no-root

RUN rm -rf /usr/share/dotnet \
&& rm -rf /opt/ghc \
&& rm -rf /usr/local/share/boost \
&& rm -rf "$AGENT_TOOLSDIRECTORY"

# Install fairseq from source
RUN git clone https://github.com/pytorch/fairseq.git \
&& cd fairseq \
&& pip install --editable ./ \
&& wget -P ./models_new 'https://dl.fbaipublicfiles.com/mms/asr/mms1b_all.pt'

COPY . .

Expand All @@ -89,4 +93,5 @@ RUN $POETRY_VENV/bin/pip install torch==1.13.1+cu117 -f https://download.pytorch

EXPOSE 9000

CMD uvicorn webservice:app --host 0.0.0.0 --port 9000 --workers 1
ADD entrypoint.sh /
CMD [ "entrypoint.sh" ]
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MODEL_URL='https://dl.fbaipublicfiles.com/mms/asr/mms1b_all.pt'
[-e $MODEL_URL] && wget -P ./model_new $MODEL_URL

uvicorn webservice:app --host 0.0.0.0 --port 9000 --workers 1

0 comments on commit b29726f

Please sign in to comment.