Error while trying to build a simple fast api image with Docker

Hello, I am new to docker and I hope the reception is warm, so am having this err while trying to build a simple fast api image in docker .This is the error :Import string “src.main.app” must be in format “:”

From python:3.10-slim

WORKDIR /code

COPY ./requirement.txt ./
RUN pip install --no-cache-dir -r requirement.txt

COPY ./src ./src

CMD [“uvicorn”," uvicorn.src.main.app", “–host”,“0.0.0.0”, “–port”,“90”,“–reload”]

To fix this, you need to change the CMD line in your Dockerfile to the following:

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "90", "--reload"]

This will tell uvicorn to import the app from the main module, and then to use the app attribute from that module.

Thank you. lemme try