Spaces:
Runtime error
Runtime error
File size: 895 Bytes
98f0633 ea6da0f 3c4f4d6 ea6da0f 2b18f9a e255f7c ea6da0f 98f0633 dabb59d 98f0633 c971876 bb61e6e c971876 98f0633 f0dc920 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
USER root
# Install python and pip
RUN apt-get update && apt-get install -y python3 python3-pip \
&& apt-get install -y git
# The commands as another prerequisite
RUN pip install --upgrade pip
RUN pip install --upgrade git+https://github.com/huggingface/transformers.git accelerate datasets[audio]
RUN chmod -R 777 ~/.cache
#
WORKDIR /code
#
COPY ./requirements.txt /code/requirements.txt
# Download the models
RUN python3 -c 'from transformers import AutoModelForSpeechSeq2Seq; AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large-v3");'
RUN python3 -c 'from transformers import AutoProcessor; AutoProcessor.from_pretrained("openai/whisper-large-v3");'
#
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
#
COPY ./app /code/app
#
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |