Tag: python

PyCharm docker debugging error

SEE EDITS I’m trying to get the latest version of PyCharm to successfully debug Django running inside Docker. However I’m having trouble setting up the remote python interpreter and I get an error as soon as I try to start the debugger. Can’t run remote python interpreter: com.github.dockerjava.api.exception.InternalServerErrorException: {“message”:”the working directory ‘C:/Program Files (x86)/JetBrains/PyCharm 171.2613.10/jre64/jre/bin’ […]

Boto3 SQS Intermittent AccessDenied

I have five Docker containers with identical Python codebases that concurrently pull items from an SQS queue and process them. However, I am randomly receiving crashes with the following exception on the fifth container (and occasionally the fourth): botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ReceiveMessage operation: Access to the resource https://queue.amazonaws.com/ is denied. […]

integrating django and sentry inside docker

I have running Django project in docker. I want to add sentry. Logging is working from localhost but from web I have connection refused. My Django config looks ok because when I checked some other sentry server, log appears correctly. I wrote simple script to test my logging using python, I’ve tried to replace localhost […]

Wrong order of running docker containers in convox/docker-compose

Here is the compose file that I am using. It consist one postgres db container and one redis container. On top of them I have a gunicorn-django–python web server(docker image:python-3.5). There is one nginx proxy server which is linked to web container. version: ‘2’ services: nginx: build: ./nginx/ ports: – 80:80 volumes: – /usr/src/app/static links: […]

How change time in docker container, if you need test cron tasks?

I have Python project (Flask, Celery, Redis, MySql) . And run this in Docker containers. Tasks must be executed at a specified time: 00:00, 06:00, */1, */3, */6, other . How i can test this? the desired result: create task with test data. after task success, need change system time, for example: 23:59:50 . wait […]

Tensorflow linear classifier. I can't run it on Docker

I am really beginner in Tensorflow. I just want to see how it works. Unfortunately, I have errors. I downloaded a code from this site : https://github.com/random-forests/tutorials/blob/master/ep7.ipynb and I uploaded it on my docker. When I run : feature_columns = learn.infer_real_valued_columns_from_input(data) classifier = learn.LinearClassifier(feature_columns=feature_columns, n_classes=10) classifier.fit(data, labels, batch_size=100, steps=1000) I should’ve : LinearClassifier() I have […]

error with Installation of rpy2 on mac

I am trying to install rpy2 on my mac machine so I can run python and R both on a Jupyter notebook. I tried to use pip and docker image and both methods did not work. Below are errors I received. Would you please advise how to get rid of these errors? pip install rpy2 […]

Python unable to find sqlalchemy-migrate in Docker image

My task is to Dockerize a Python flask application. Part of this application makes use of sqlite to manage the users. The issue I am facing is python is complaining that it cannot find the sqlalchemy-migrate distribution. In order to isolate the application I wrote a tiny to import the same modules as the application. […]

How to clear cache on building Gitlab?

Gitlab can’t clean my cache on building. How to fix this problem? Executor: shell Fetching changes… warning: failed to remove config/__pycache__/__init__.cpython-36.pyc warning: failed to remove config/settings/__pycache__/local.cpython-36.pyc warning: failed to remove config/settings/__pycache__/__init__.cpython-36.pyc warning: failed to remove config/settings/__pycache__/common.cpython-36.pyc warning: failed to remove config/settings/__pycache__/test.cpython-36.pyc warning: failed to remove docs/__pycache__/__init__.cpython-36.pyc

Bidirectional communication with 'docker exec -it bash <container_id>' using docker-py

I can’t seem to figure out how to enable async i/o with a container shell session using docker-py SDK. What I am essentially trying to achieve is to have a working equivalent of docker exec -it bash $container_id in docker-py. Obviously, stdout poses no problems. It’s just that there is no (glaringly obvious) way to […]

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