Tag: python

Tensorflow Object Detection Killed before starting

I am running docker image tensorflow:1.1.0. I have added the tensorflow object detection api github by cloning it locally and giving my docker a connection to the folder. I am trying to recreate their pet example. I believe I have all code and code in the right places. However, when I try to retrain, tensorflow […]

Script fails at build but works from Docker container

I am trying to run unit tests through Docker for a directory monitor which reacts to file and directory creation, movement and renaming. Here is the script : #/bin/bash # Launch Redis server redis-server –daemonize yes # Start directory_observer python /test/directory_observer/src/directory_observer.py –config=/test/directory_observer/tests/directory_observer.ini & # Execute test script (operations in the folders) bash /test/directory_observer/tests/Dockerfile_testing/directory_observer_test_cases.sh # Run […]

Temporary failure in name resolution [Errno -3] with Docker

I’m following the docker tutorial and am on the part where I have to build the app using: docker build -t friendlyhello . It reaches up to step 4, where after a pause I get this error: Step 4/7 : RUN pip install -r requirements.txt —> Running in 7f4635a7510a Collecting Flask (from -r requirements.txt (line […]

Dockerfile contains a python script that writes to an output file, but the output file is not being created on the container

It’s my first question, so be gentle 🙂 I’ve got a Dockerfile as follows: FROM centos:latest Maintainer Liz Miller LABEL description=”Image Built with Dockerfile.” RUN yum -y update RUN yum -y install python-setuptools RUN easy_install supervisor RUN mkdir -p /var/log/supervisor RUN yum -y install which RUN yum -y install git RUN yum install python COPY […]

How do I use Liblas in python in docker without error?

I am trying to use liblas to manipulate some lidar data in python in docker, but I keep getting an error. The code I am trying to run is copy-pasted from the liblas python tutorial, and should simply create a las-file and write a point to it: from liblas import file from liblas import header […]

Logging to logstash from python

I am having some troubles logging to logstash from python. I am using a docker image from sebp/elk (http://elk-docker.readthedocs.io) and python-logstash (https://pypi.python.org/pypi/python-logstash) as a logging handler The docker image exposes port 5044 for the Beats interface (http://elk-docker.readthedocs.io/#usage). Whenever I try to log to this port nothing happens… Is there some other port I should be […]

Alternatives to debug a docker + gunicorn app in production

I’m kinda curious of what alternatives people are using to debug applications that are running live with either uwsgi or gunicorn in a Docker container. The scenario would be, a bug that cannot be reproduced locally, and it seems to be happening only in production / staging. From what I’ve seen, some people seem to […]

How can I run 2 long commands in a docker container

My Project bases on python-flask and celery with RabbitMq. So I have to run 2 long services in the one container: Two services: 1. gunicorn -w 64 -b manage:app 2. celery worker -A celery_worker.celery –loglevel=info Those 2 services are both running as long time commands I don’t know how to write the Dockerfile to […]

docker python SDK – pipe output to a file in exec_run

Using the docker python SDK, I’m trying to pipe output of an echo command to exec_run as follows. container.exec_run([‘echo’,’5′,’|’,’python’,’test.py’]) the test.py has following code s = input() print(s) The output that is produced is : b’5 | python test.py\n’ instead of the expected output of the script. How can this be corrected ?

Extra package installation in boot2docker

I am running a virtual machine using boot2docker. I have to install extra packages (e.g Python library). I read I should use the command tce-load command for the installation, but when I enter this command I get already the error: tce-load: command not found. Any idea about how this can be fixed? Thank you very […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.