This must be a common question but I can't find a proper answer: When running my docker image, I get an import error:
File "./app/main.py", line 8, in <module>
import wekinator
ModuleNotFoundError: No module named 'wekinator'`
How do I import local python modules in Docker? Wouldn't the COPY command copy the entire "app" folder (including both files), hence preserving the correct import location?
.
├── Dockerfile
├── README.md
└── app
├── main.py
└── wekinator.py
FROM python:3.7
RUN pip install fastapi uvicorn python-osc
EXPOSE 80
COPY ./app /app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]