Build stuck on a FastApi app in docker space

I’m trying to deploy a FastApi app in a docker space, I’ve got the following error:

Runtime error

launch timed out, space was not healthy after 30 min

Container logs:

INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on (Press CTRL+C to quit)

The app is stuck in the build phase despite showing the INFO: Uvicorn running on (Press CTRL+C to quit) log. and the build ends up by a runtime error.

this is my dockerfile

FROM python:3.9-slim-buster


# install dependencies
COPY ./requirements.txt /app
RUN pip install --no-cache-dir --upgrade -r requirements.txt

RUN apt-get update && apt-get install -y libsndfile1
RUN apt-get update && apt-get install -y ffmpeg

RUN useradd -m -u 1000 user
USER user

ENV HOME=/home/user \


COPY --chown=user . $HOME/app

CMD ["uvicorn", "main:app", "--host", "", "--port", "8010"]

and this is my docker-compose file:

    build: .
    container_name: gpt-summary
    command: uvicorn main:app --host --port 8010 --reload
      - 8000:8010
      - .:/app

Please, Can anyone help?

hi @zinoubm ,
I just want to double-check, do you have app_port: 8010 included in the
Could you please share the link to your Space?

I am also experiencing this error, the only difference being I am running on the default port 7860