Spaces:
Runtime error
Runtime error
# | |
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"] |