Skip to content
Advertisement

Tag: docker

Docker compose missing python package

To preface I’m fairly new to Docker, Airflow & Stackoverflow. I’ve got an instance of Airflow running in Docker on an Ubuntu (20.04.3) VM. I’m trying to get Openpyxl installed on build in order to use it as the engine for pd.read_excel. Here’s the Dockerfile with the install command: The requirements.txt file looks like this: And the docker-compose.yaml file looks

ModuleNotFoundError: No module named ‘app’ fastapi docker

when i used docker-compose up -d ModuleNotFoundError: No module named ‘app’ the folders in Fastapi framework: fastapi app -main.py Dockerfile docker-compose Answer Your work directory is /app and the main.py file is already there. So you don’t need to call app.main module. Just call main.py script directly in CMD.

How to add Python and pip or conda packages to DDEV

I need to execute a Python script inside the Ddev web docker image, but am having trouble figuring out what Debian python libraries are required to get Python binary with additional py package dependencies working. Answer Python 2 on DDEV You really don’t want to be using Python 2 do you? (See caveats 1 & 2 below) Add the following

flask app not running automatically from Dockerfile

My simple flask app is not automatically starting when I run in docker, though I have added CMD command correctly. I am able to run flask using python3 /app/app.py manually from container shell. Hence, no issue with code or command I run docker container as When I log in to docker container and run “ps -eaf” on Ubuntu shell of

Why TensorFlow CPU 2.7.0 is not found by docker while creating an image?

I am building a docker image, using this Dockerfile: This is the command I used: And it is giving this error: Why it can’t find tensorflow-cpu==2.7.0, when this TensorFlow version is available. What’s wrong? Here is my requirements.txt: What is not working: Just writing tensorflow in requirements.txt is also not working. Removing tensorflow from requirements.txt and adding this RUN python3.8

ADD multiple Files to a docker but just RUN one of them

It’s just a theoretical question. Is there a way to run the docker but only run one specific script without changing the Dockerfile? Maybe with the docker run [container] command? Dockerfile: Theoretical Command: docker run docker-test main2.py Answer There is nothing “theoretical” about this. Docker copies into place the files, and if they are working executables, you can execute them

Advertisement