Skip to content
Advertisement

Tag: docker

os.getcwd() raise Exception with django dev server

I have a django project running inside docker, and the service is up with the command of python manage.py runserver, with file autoreload open, and using threadings. My code invokes shutil.make_archive() which will then invoke os.getcwd(), and from time to time, os.getcwd() will raise FileNotFoundError, by searching more information, now I realized that the error might be caused by the

How to pass volume to docker container?

I am running the below docker command : docker run -d -v /Users/gowthamkrishnaaddluri/Documents/dfki_sse/demo:/quantum-demo/ -it demo python3 /quantum-demo/circuit.py –res ‘./’ I am trying to run the above command in python and I have the code as follows: container = client.create_container( image=’demo’, stdin_open=True, tty=False, command=”python3 /quantum-demo/circuit.py –res=’./'”, volumes=[‘/Users/gowthamkrishnaaddluri/Documents/dfki_sse/demo’, ‘/quantum-demo/’], detach=True, ) client.start(container=container.get(‘Id’)) I am not able to see the files which get

How to setup ffmpeg in docker container

I want to compress the video from project directory using ffmpeg in python the video is saved from cv2.VideoCapture(rtsp_url) Normally it run without problem in my local machine, but when I dockerize my app it seems docker container can’t recognize ffmpeg or I missed something. It throws exception This is how I docker my python app. Answer To debug your

Pandas on Apple Silicon M1 chip within the Ubuntu container

I have a trouble understanding the issue here: We have Docker image ubuntu:20.04 MacBook Pro on M1 chip Old pandas version wheel (legacy system) Within our Docker image, we use Poetry to manage dependencies: But when we try to build this image on the M1 machine, we face the error ERROR: pandas-0.24.0-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.,

Why does my Python file directory structure not match my Dockerfile output?

My Dockerfile (run by a much larger docker-compose): and the relevant code from the docker-compose.yml: The Python code I’m using to check the directory structure: and its output: I don’t understand why the directory structure seen/output by the Dockerfile would be completely different from the directory structure seen/output by my Python file. For some reason, even though the Python code

Docker run does not produce any endpoint

I am trying to dockerize this repo. After building it like so: I try to run it like so: It downloads the necessary libraries and packages: And then nothing… No errors, no endpoints generated, just radio silence. What’s wrong? And how do I fix it? Answer You appear to be expecting your application to offer a service on port 5000,

“Database ‘docker-db’ does not exist”

so I have this problem building django/postgre app with docker. it keeps saying “database does not exist” and quite few time googling doesnt bring any results. I already scrapped the volumes and rebuilt my app few times, followed different guides on how people do the postgres, still no luck making it work for me. Dockerfile compose.yml .env UPDATE: Error messages

Airflow 2.2.2 remote worker logging getting 403 Forbidden

I have a setup where airflow is running in kubernetes (EKS) and remote worker running in docker-compose in a VM behind a firewall in a different location. Problem Airflow Web server in EKS is getting 403 forbidden error when trying to get logs on remote worker. Build Version Airflow – 2.2.2 OS – Linux – Ubuntu 20.04 LTS Kubernetes 1.22

Advertisement