# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker # you will also find guides on how best to write your Dockerfile # FROM python:3.9 # WORKDIR /code # COPY ./requirements.txt /code/requirements.txt # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # COPY . . # CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] # Use the official Python 3.10.9 image FROM python:3.10.12 RUN apt-get update && \ apt-get install -y portaudio19-dev RUN apt-get update && \ apt-get install -y ffmpeg # Copy the current directory contents into the container at . COPY . . # Set the working directory to / WORKDIR / RUN mkdir -p /uploads RUN chmod 777 /uploads # Install requirements.txt # RUN conda install ffmpeg RUN pip install --upgrade pip # RUN pip install portaudio # RUN pip install pipwin # pip insta/ # RUN pipwin install Pyaudio RUN pip install --no-cache-dir --upgrade -r /requirements.txt # Start the FastAPI app on port 7860, the default port expected by Spaces CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]