Coder Social home page Coder Social logo

deeplabcut / docker4deeplabcut2.0 Goto Github PK

View Code? Open in Web Editor NEW
50.0 7.0 26.0 228 KB

Docker container for running DeepLabCut 2.0, 2.1 (linux support only). Now, DLC main supports 2.2+

Home Page: http://deeplabcut.org

Dockerfile 2.58% Jupyter Notebook 79.01% Shell 18.40%
deeplabcut docker pose-estimation docker-container ubuntu gpu

docker4deeplabcut2.0's Introduction

Docker Image CI Image.sc forum Gitter Twitter Follow

New! We now support docker directly from the main DeepLabCut repo, and even have a simple pip package for the latest dockers please see: https://github.com/DeepLabCut/DeepLabCut

This repo supports DeepLabCut versions prior to 2.2 (namely, support stopped in Dec 2020), and will not be actively maintained.

Docker Environment for DeepLabCut2.0+

This package will allow you to run DeepLabCut2.x with everything pre-installed inside a Docker container. This base container is mainly useful for server deployment for training networks and video analysis (i.e. you can move this to your server, University Cluster, AWS, etc) as it assumes you have no display.

However, if you want to use the GUIs, there is a "heavy" image (16 GB) that eqs built from our original container. Please see here for more information.

This Docker file is based off the Bethge lab container. Specifically, the one we provide comes with CUDA 10.0 + CuDNN v7 and Tensorflow 1.13.1 and the required python packages to run deeplabcut.

Note, please check your NVIDIA driver is up to date. Please check your driver/CUDA/TensorFlow version on this Stackoverflow post.

Here are my tips for setting up your GPU machine (ubuntu 18.04): https://github.com/DeepLabCut/Docker4DeepLabCut2.0/wiki/Installation-of-NVIDIA-driver-and-CUDA-10

NOTE: this container does not work on windows hosts

Prerequisites

(1) Install Docker. See https://docs.docker.com/install/ & for Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/ Test docker:

$ sudo docker run hello-world

The output should be: Hello from Docker! This message shows that your installation appears to be working correctly.

(2) Install nvidia-docker if you have Ubuntu < or = to 18.04, see https://nvidia.github.io/nvidia-docker/. Otherwise it is now natively installed. But, basically it is just:

$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
$ sudo apt-get update

$ sudo apt-get install nvidia-docker2

*you can also run: sudo docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi to test your nvidia-docker, and if you get the error docker: Error response from daemon: Unknown runtime specified nvidia. just simply restart docker:

   $ sudo systemctl daemon-reload
   $ sudo systemctl restart docker

(3) Add your user to the docker group (https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) Quick guide to create the docker group and add your user: Create the docker group.

$ sudo groupadd docker

Add your user to the docker group.

$ sudo usermod -aG docker $USER

(perhaps restart your computer (best) or (at min) open a new terminal to make sure that you are added from now on) Lastly, download this Docker:

git clone https://github.com/DeepLabCut/Docker4DeepLabCut2.0
cd Docker4DeepLabCut2.0

Step-by-step instructions for creating the Docker environment:

Next create the image. The image needs only be created once to use the commands below (i.e. you can enter, stop and re-enter a container again). However, if you want to UPGRADE YOUR DEEPLABCUT package, you should build a new image! All the required software will be downloaded from DockerHub. (you can pick a user name and container name other than dlc_username/dlcdocker if you want):

docker image build -t dlc_username/dlcdocker .

Starting the docker container from your image (de-novo):

In the terminal start your container with the following command (in the DockerContainer4DeepLabCut2.0 folder):

Options:

  • change port: (i.e. 2351 can be 777, etc)
  • change which GPU to use (check which GPU you want to use in the terminal by running nvidia-smi)
  • change the name: --name containername can be anything you want
  • change the home folder:-e USER_HOME=$HOME/DeepLabCut (i.e. this can be -e USER_HOME=$HOME/whateveryouwant)
# Create the DLC directory if it does not already exist
mkdir -p $HOME/DeepLabCut # or $HOME/whateveryouwant (see the options above)

# Run the docker container
GPU=1 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker

Do not run this with sudo.

  • Enter the container via the terminal (to get terminal access in container):
docker exec --user $USER -it containername /bin/bash

Access your linked (internal home) directory:

cd ../../../home/

If you are using a container that has pip install deeplabcut in the dockerfile: you need to supress the GUI support:

Linux: export DLClight=True

Note, we also now have a headless deeplabcut that does not have GUI support (now the default in this repo as of 5/17/2020): i.e., dockerfile uses pip install deeplabcutcore

Now you have an Ubuntu with Python3 and a GPU-installed with Tensorflow 1.8, and all the other dependencies ... installed! Happy DeepLabCutting!

Jupyter + Docker:

This container could also be used for other things besides DeepLabCut, so you might want to utlitize the features in Jupyter, i.e. you can also go into the terminal separately via a browser interface (i.e Google Chrome + a Jupyter Notebook) to check out what's inside. For this, go to the port you specified, i.e. in our example enter http://localhost:2351 in Google Chrome. Get the token for entry: back in the terminal, look at the docker log; copy and paste the value after "token=":

$ docker logs containername 

Then, you can open the notebook provided, to check your installation and play around with other ways this Docker could be useful to you.

Using the Docker for Training and Video Analysis:

Here is an example Notebook for using DeepLabCut with Jupyter: https://github.com/AlexEMG/DeepLabCut/blob/master/examples/Docker_TrainNetwork_VideoAnalysis.ipynb

Docker Quick Tips:

Check which containers are running:

$ docker ps 

You can stop a container:

$ docker stop containername 

You can re-start your container:

$ docker start containername

After stopping you can remove old containers:

$ docker rm containername

(once removed, it can be created again):

GPU=1 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker

docker4deeplabcut2.0's People

Contributors

alexemg avatar alyetama avatar astraw avatar dmd avatar donniekim411 avatar margolislab avatar mmathislab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker4deeplabcut2.0's Issues

import deeplabcutcore failed

Hello.

I made deeplabcut environment on the AWS, centos7 instance by using new Dockerfile with deeplabcutcore command.

After struggles with installing nvidia-docker, I finally succeeded running deeplabcut docker container.

But I can't start deeplabcut in python script! It failed with importing error of deeplabcut or deeplabcutcore.
Here are the logs:

dlc@b2584f31192a:/$ python3
Python 3.6.3 (default, Oct  6 2017, 08:44:35)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deeplabcut
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'deeplabcut'

>>> import deeplabcutcore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/deeplabcutcore/__init__.py", line 20, in <module>
    from deeplabcutcore.create_project import create_new_project, create_new_project_3d, add_new_videos, load_demo_data
  File "/usr/local/lib/python3.6/dist-packages/deeplabcutcore/create_project/__init__.py", line 1, in <module>
    from deeplabcutcore.create_project.new import create_new_project
  File "/usr/local/lib/python3.6/dist-packages/deeplabcutcore/create_project/new.py", line 14, in <module>
    from deeplabcut import DEBUG
ModuleNotFoundError: No module named 'deeplabcut'

It seems the problem is deeplabcut module not existing.
Can I solve this problem with executing only 'pip install deeplabcut'?
Or is this problem caused by my specific settings (AWS, centos7)?

If you have any suggestion about this problem, please give me some advice!

Thank you and best regards.

`import deeplabcut` fails inside `scipy`

Dear all,

I have built the Docker image

git clone https://github.com/MMathisLab/Docker4DeepLabCut2.0
cd Docker4DeepLabCut2.0
docker image build -t deep_lab_cut .
docker run -it deep_lab_cut /bin/bash

and have tried some basic things on the command line. Doing

root@46e8194c5958:~# export DLClight=True
root@46e8194c5958:~# ipython
Python 3.6.3 (default, Oct  6 2017, 08:44:35) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import deeplabcut

Gives an import error inside of scipy trying to get a feature from numpy, see below.

Any ideas on how to fix this?

I seems like bumping up the scipy version in the container might help, apache/mxnet#17398.

Best regards,
Hugo

DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-cfa4f159dfc5> in <module>()
----> 1 import deeplabcut

/usr/local/lib/python3.6/dist-packages/deeplabcut/__init__.py in <module>()
     41     print("Project loaded in colab-mode. Apparently Colab has trouble loading statsmodels, so the smoothing & outlier frame extraction is disabled. Sorry!")
     42 else:
---> 43     from deeplabcut.refine_training_dataset import extract_outlier_frames, merge_datasets
     44     from deeplabcut.post_processing import filterpredictions, analyzeskeleton
     45 

/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/__init__.py in <module>()
     18     from deeplabcut.refine_training_dataset.auxfun_drag import *
     19 
---> 20 from deeplabcut.refine_training_dataset.outlier_frames import *

/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/outlier_frames.py in <module>()
     14 from pathlib import Path
     15 import pandas as pd
---> 16 import statsmodels.api as sm
     17 from deeplabcut.utils import auxiliaryfunctions, visualization
     18 from deeplabcut.utils import frameselectiontools

/usr/local/lib/python3.6/dist-packages/statsmodels/api.py in <module>()
      5 from . import tools
      6 from .tools.tools import add_constant, categorical
----> 7 from . import regression
      8 from .regression.linear_model import OLS, GLS, WLS, GLSAR
      9 from .regression.recursive_ls import RecursiveLS

/usr/local/lib/python3.6/dist-packages/statsmodels/regression/__init__.py in <module>()
----> 1 from .linear_model import yule_walker
      2 
      3 from statsmodels.tools._testing import PytestTester
      4 
      5 __all__ = ['yule_walker', 'test']

/usr/local/lib/python3.6/dist-packages/statsmodels/regression/linear_model.py in <module>()
     38 import numpy as np
     39 from scipy.linalg import toeplitz
---> 40 from scipy import stats
     41 from scipy import optimize
     42 

/usr/local/lib/python3.6/dist-packages/scipy/stats/__init__.py in <module>()
    343 from .stats import *
    344 from .distributions import *
--> 345 from .morestats import *
    346 from ._binned_statistic import *
    347 from .kde import gaussian_kde

/usr/local/lib/python3.6/dist-packages/scipy/stats/morestats.py in <module>()
     10                    sqrt, ceil, floor, array, compress,
     11                    pi, exp, ravel, count_nonzero, sin, cos, arctan2, hypot)
---> 12 from numpy.testing.decorators import setastest
     13 
     14 from scipy._lib.six import string_types

ModuleNotFoundError: No module named 'numpy.testing.decorators'

The versions present in the container are:

In [2]: import numpy.version
In [4]: print(numpy.version.version)
1.18.1
In [7]: import scipy.version
In [8]: print(scipy.version.version)
1.0.0

conda environment and the docker

Pretty new to Linux and Docker, so bear with me.... For installation of DeepLabCut I have set up an environment (called DLC), and all works great just using CPU. Now, plugged in new GPU and am trying to use your docker to get training with GPU going.

When I built the image of the docker, should I have been in my DLC environment? I wasn't, and now I'm wondering...

Can I start the docker container, then enter my environment, or vice-versa?

Hope my question make sense. Be gentle with me.

Permissions issue in deeplabcut.create_training_dataset()

In [7]: deeplabcut.create_training_dataset(config_path)
/home/rckoepke/DLC/Train1-rckoepke-2019-12-04/training-datasets/iteration-0/UnaugmentedDataSet_Train1Dec4  already exists!
Downloading a ImageNet-pretrained model from http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz....
---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
<ipython-input-7-c980124be66b> in <module>()
----> 1 deeplabcut.create_training_dataset(config_path)

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/trainingsetmanipulation.py in create_training_dataset(config, num_shuffles, Shuffles, windows2linux, userfeedback, trainIndexes, testIndexes, net_type, augmenter_type)
    594     parent_path = Path(os.path.dirname(deeplabcut.__file__))
    595     defaultconfigfile = str(parent_path / 'pose_cfg.yaml')
--> 596     model_path,num_shuffles=auxfun_models.Check4weights(net_type,parent_path,num_shuffles) #if the model does not exist >> throws error!
    597 
    598     if Shuffles==None:

/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/auxfun_models.py in Check4weights(modeltype, parent_path, num_shuffles)
     30     if num_shuffles>0:
     31         if not model_path.is_file():
---> 32             Downloadweights(modeltype,model_path)
     33 
     34     return str(model_path),num_shuffles

/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/auxfun_models.py in Downloadweights(modeltype, model_path)
     49         response = urllib.request.urlopen(url)
     50         with tarfile.open(fileobj=BytesIO(response.read()), mode='r:gz') as tar:
---> 51             tar.extractall(path=target_dir)
     52     except KeyError:
     53         print("Model does not exist: ", modeltype)

/usr/lib/python3.6/tarfile.py in extractall(self, path, members, numeric_owner)
   2005             # Do not set_attrs directories, as we will do that further down
   2006             self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
-> 2007                          numeric_owner=numeric_owner)
   2008 
   2009         # Reverse sort directories.

/usr/lib/python3.6/tarfile.py in extract(self, member, path, set_attrs, numeric_owner)
   2047             self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
   2048                                  set_attrs=set_attrs,
-> 2049                                  numeric_owner=numeric_owner)
   2050         except OSError as e:
   2051             if self.errorlevel > 0:

/usr/lib/python3.6/tarfile.py in _extract_member(self, tarinfo, targetpath, set_attrs, numeric_owner)
   2117 
   2118         if tarinfo.isreg():
-> 2119             self.makefile(tarinfo, targetpath)
   2120         elif tarinfo.isdir():
   2121             self.makedir(tarinfo, targetpath)

/usr/lib/python3.6/tarfile.py in makefile(self, tarinfo, targetpath)
   2158         source.seek(tarinfo.offset_data)
   2159         bufsize = self.copybufsize
-> 2160         with bltn_open(targetpath, "wb") as target:
   2161             if tarinfo.sparse is not None:
   2162                 for offset, size in tarinfo.sparse:

PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/models/pretrained/resnet_v1_50.ckpt'

Docker not building

Dear Mackenzie,

I had to reinstall Ubuntu from scratch (nothing related to Deeplabcut) but now, reinstalling Deeplabcut's docker ran into this:

screenshot from 2019-02-09 11-31-42

Any suggestions?

./dlc-docker: line 179: nvidia-docker: command not found

I am trying to run the docker image on Pop!_OS 20.04, with NVIDIA 455.38, GeForse RTX 2070.
I have the latest nvidia-container-toolkit from the Pop!_OS repositories, which I am assured is the same as the latest NVIDIA for Ubuntu 20.04, .
I also have the latest Docker from the repositories, version 19.03.13, build 4484c46d9d.
nvidia-smi shows that my gpu is '0'.
I setup according to the readme, but when I get to the command:
GPU=0 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name dlcContainer kdys/dlcdocker
I get the following:

ret run -d -p 2351:8888 -e USER_HOME=/home/kdys/DeepLabCut --name dlcContainer kdys/dlcdocker run
1st CMD run

* Setting user name to:             kdys
* Setting user ID to:               1000
* Setting user groups to:           sudo
* Setting password to:              pw
* Setting Notebook port binding to: 2351 (to set manually add -p 2351:8888 as flag)

You can now open the notebook on the host machine by directing your browser to

    http://localhost:2351

0 nvidia-docker run -v /home/kdys:/home/kdys -p 35053:22 -p 2351:8888 -e USER_GROUPS=sudo -e USER=kdys -e USER_ID=1000 -e USER_ENCRYPTED_PASSWORD=aa5V9MSdgw5ec -e USER_HOME=/home/kdys -e GPU=0 -e DISPLAY=:1 -d -e USER_HOME=/home/kdys/DeepLabCut --name dlcContainer kdys/dlcdocker
./dlc-docker: line 179: nvidia-docker: command not found

A little searching has led me to understand that "nvidia-docker" command is deprecated.
I tried to install nvidia-docker2 as suggested here https://github.com/NVIDIA/nvidia-docker/issues/1028, but I am met with:
E: Unable to locate package nvidia-docker2

Is anyone running this on Ubuntu 20.04? And if so how do we bypass the depricated nvidia-docker command?
Thanks

import deeplabcut fails

On a fresh installation I tried to run

rckoepke@f3a6434b8bd0:/home/rckoepke/DLC$ ipython
Python 3.6.3 (default, Oct  6 2017, 08:44:35) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import deeplabcut

and received the following error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-cfa4f159dfc5> in <module>()
----> 1 import deeplabcut

/usr/local/lib/python3.6/dist-packages/deeplabcut/__init__.py in <module>()
     28     else:
     29         mpl.use('Agg')
---> 30     from deeplabcut import generate_training_dataset
     31     from deeplabcut import refine_training_dataset
     32     from deeplabcut.generate_training_dataset import label_frames, dropannotationfileentriesduetodeletedimages, comparevideolistsanddatafolders, dropimagesduetolackofannotation

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/__init__.py in <module>()
     16     pass
     17 else:
---> 18     from deeplabcut.generate_training_dataset.auxfun_drag_label import *
     19     from deeplabcut.generate_training_dataset.labeling_toolbox import *
     20     from deeplabcut.generate_training_dataset.multiple_individual_labeling_toolbox import *

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/auxfun_drag_label.py in <module>()
     17 
     18 import numpy as np
---> 19 import wx
     20 
     21 class DraggablePoint:

ModuleNotFoundError: No module named 'wx'

running rckoepke@f3a6434b8bd0:/home/rckoepke/DLC$ sudo apt install python-wxtools did not fix the problem.

running pip install wxPython fails due to lack of gtk+:

    Perhaps you should add the directory containing `gtk+-3.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gtk+-3.0' found
    Package gthread-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gthread-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gthread-2.0' found
    no
    *** Could not run GTK+ test program, checking why...
    *** The test program failed to compile or link. See the file config.log for the
    *** exact error that occured. This usually means GTK+ is incorrectly installed.
    configure: error:
    The development files for GTK+ were not found. For GTK+ 2, please
    ensure that pkg-config is in the path and that gtk+-2.0.pc is
    installed. For GTK+ 1.2 please check that gtk-config is in the path,
    and that the version is 1.2.3 or above. Also check that the
    libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
    --libs' are in the LD_LIBRARY_PATH or equivalent.
    
    Error running configure
    ERROR: failed building wxWidgets
    Traceback (most recent call last):
      File "build.py", line 1468, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-install-pkzt_vvx/wxPython/buildtools/build_wxwidgets.py", line 372, in main
        "Error running configure")
      File "/tmp/pip-install-pkzt_vvx/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    buildtools.builder.BuildError: Error running configure
    Finished command: build_wx (0m5.642s)
    Finished command: build (0m5.642s)
    Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pkzt_vvx/wxPython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pkzt_vvx/wxPython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xeznpt_e/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

then tried sudo apt install libgtk-3-dev

after this, pip install wxPython fails at:

rckoepke@f3a6434b8bd0:/home/rckoepke/DLC$ pip install wxPython
Processing ./.cache/pip/wheels/7e/31/ff/0353a9b7a296b15b20a5300cb56da71c3018930c777f3b3b21/wxPython-4.0.7.post2-cp36-cp36m-linux_x86_64.whl
Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from wxPython) (5.0.0)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from wxPython) (1.11.0)
Requirement already satisfied: numpy; python_version >= "3.0" in /usr/local/lib/python3.6/dist-packages (from wxPython) (1.17.4)
Installing collected packages: wxPython
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/wxPython-4.0.7.post2.dist-info'
Consider using the `--user` option or check the permissions.

but sudo pip install wxPython succeeds (warning to passersby, this is almost certainly the WRONG way to "do it")

at this point, trying In [1]: import deeplabcut results in the following:

rckoepke@f3a6434b8bd0:/home/rckoepke/DLC$ ipython
Python 3.6.3 (default, Oct  6 2017, 08:44:35) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import deeplabcut
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/usr/lib/python3.6/tkinter/__init__.py in <module>()
     36 try:
---> 37     import _tkinter
     38 except ImportError as msg:

ModuleNotFoundError: No module named '_tkinter'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-cfa4f159dfc5> in <module>()
----> 1 import deeplabcut

/usr/local/lib/python3.6/dist-packages/deeplabcut/__init__.py in <module>()
     28     else:
     29         mpl.use('Agg')
---> 30     from deeplabcut import generate_training_dataset
     31     from deeplabcut import refine_training_dataset
     32     from deeplabcut.generate_training_dataset import label_frames, dropannotationfileentriesduetodeletedimages, comparevideolistsanddatafolders, dropimagesduetolackofannotation

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/__init__.py in <module>()
     17 else:
     18     from deeplabcut.generate_training_dataset.auxfun_drag_label import *
---> 19     from deeplabcut.generate_training_dataset.labeling_toolbox import *
     20     from deeplabcut.generate_training_dataset.multiple_individual_labeling_toolbox import *
     21     from deeplabcut.generate_training_dataset.frame_extraction_toolbox import *

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py in <module>()
     25 import argparse
     26 from deeplabcut.generate_training_dataset import auxfun_drag_label
---> 27 from deeplabcut.utils import auxiliaryfunctions
     28 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
     29 from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar

/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/__init__.py in <module>()
----> 1 from deeplabcut.utils.make_labeled_video import *
      2 from deeplabcut.utils.auxiliaryfunctions import *
      3 from deeplabcut.utils.video_processor import *
      4 from deeplabcut.utils.plotting import *
      5 

/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/make_labeled_video.py in <module>()
     32     mpl.use('WxAgg') #TkAgg
     33 else:
---> 34     mpl.use('TkAgg')
     35 import matplotlib.pyplot as plt
     36 

/usr/local/lib/python3.6/dist-packages/matplotlib/__init__.py in use(arg, warn, force)
   1389         if force:
   1390             from matplotlib.pyplot import switch_backend
-> 1391             switch_backend(name)
   1392     # Finally if pyplot is not imported update both rcParams and
   1393     # rcDefaults so restoring the defaults later with rcdefaults

/usr/local/lib/python3.6/dist-packages/matplotlib/pyplot.py in switch_backend(newbackend)
    205         else "matplotlib.backends.backend_{}".format(newbackend.lower()))
    206 
--> 207     backend_mod = importlib.import_module(backend_name)
    208     Backend = type(
    209         "Backend", (matplotlib.backends._Backend,), vars(backend_mod))

/usr/lib/python3.6/importlib/__init__.py in import_module(name, package)
    124                 break
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)
    127 
    128 

/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_tkagg.py in <module>()
----> 1 from . import _backend_tk
      2 from .backend_agg import FigureCanvasAgg
      3 from ._backend_tk import (
      4     _BackendTk, FigureCanvasTk, FigureManagerTk, NavigationToolbar2Tk)
      5 

/usr/local/lib/python3.6/dist-packages/matplotlib/backends/_backend_tk.py in <module>()
      3 import os.path
      4 import sys
----> 5 import tkinter as Tk
      6 from tkinter.simpledialog import SimpleDialog
      7 from contextlib import contextmanager

/usr/lib/python3.6/tkinter/__init__.py in <module>()
     37     import _tkinter
     38 except ImportError as msg:
---> 39     raise ImportError(str(msg) + ', please install the python3-tk package')
     40 TclError = _tkinter.TclError
     41 from tkinter.constants import *

ImportError: No module named '_tkinter', please install the python3-tk package

In [2]: exit

this is fixed with sudo apt install python3-tk and finally:

In [1]: import deeplabcut works without failing.

Adding High Performance Computing support with Singularity

Dear Deeplabcut Developers,
Hi, I am a user of DeepLabCut who find your software truly astonishing when applied to our mice
continuous monitoring project! We purchased 3 GPUs to analyzing months-long videos using the docker container you supplied. Unfourtantely, it seem that for our case, the processing speed still lag far behind
new data generation.

After some research, we find that maybe deploying deeplabcut for video evaluation step only on HPC clusters with GPU/tensorflow support might be the solution. The specific platform that we are considering is Comet Supercomuting systems that support user defined enviroment thorough Singularity. (They offer trial account for ~100GPU hours)
https://www.sdsc.edu/support/user_guides/tutorials/singularity.html
NIH seems that have a similar system as well https://hpc.nih.gov/apps/singularity.html

I tried to make a conversion from docker container dlc_username/dlcdocker to Singularity image with
https://github.com/singularityware/docker2singularity
Detailed Command:
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v /home/hanlin:/output \
--privileged -t --rm \
singularityware/docker2singularity \
--name hanlinGPU dlc_username/dlcdocker
but failed to import deeplabcut inside the singularity image (command: singularity shell hanlinGPU.simg)
(trying on my own desktop, not on HPC yet) with the following erros.
image

image

The problem might be some " path binding " issues referred in the NIH singularity guide above but I couldn't understand much as being quite new to linux systems. Could you kindly guide me through such conversion. This should really benefit the research community where high thouroughput analysis is desired. Thanks a lot!

Best

nvidia-docker + suppressing wxPython

Hi,

I'm having the following error when checking nvidia-docker:

rodrigo@rodrigo-system$: nvidia-docker run --rm nvidia/cuda nvidia-smi
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: "nvidia-smi": executable file not found in $PATH": unknown.

However, when I use nvidia-smi, I get a different answer:
rodrigo@rodrigo-system$: nvidia-smi

Sat Feb 2 11:14:22 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 415.27 Driver Version: 415.27 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 On | N/A |
| 18% 58C P0 32W / 120W | 278MiB / 6077MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1080 G /usr/lib/xorg/Xorg 172MiB |
| 0 1740 G compiz 41MiB |
| 0 2524 G ...quest-channel-token=9382442561943703752 60MiB |
+-----------------------------------------------------------------------------+

It seems a problem with nvidia-smi $PATH but I don't know how to correct!
nvidia-smi is in /usr/bin/nvidia-smi -> /etc/alternatives/x86_64-linux-gnu_nvidia_smi (link)

ModuleNotFoundErrot: No module named 'numpy.testing.decorators'

Hey!

So I started on a fresh installation of ubuntu 18.04 and everything worked including building the docker image and entering the docker container. However, when inside the container -
export DLClight=True -> works
ipython -> works
import deeplabcut -> I get the following error

prnv@8f1fe0ba761e:/$ export DLClight=True
prnv@8f1fe0ba761e:/$ ipython
Python 3.6.3 (default, Oct 6 2017, 08:44:35)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import deeplabcut
DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import deeplabcut

/usr/local/lib/python3.6/dist-packages/deeplabcut/init.py in ()
41 print("Project loaded in colab-mode. Apparently Colab has trouble loading statsmodels, so the smoothing & outlier frame extraction is disabled. Sorry!")
42 else:
---> 43 from deeplabcut.refine_training_dataset import extract_outlier_frames, merge_datasets
44 from deeplabcut.post_processing import filterpredictions, analyzeskeleton
45

/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/init.py in ()
18 from deeplabcut.refine_training_dataset.auxfun_drag import *
19
---> 20 from deeplabcut.refine_training_dataset.outlier_frames import *

/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/outlier_frames.py in ()
14 from pathlib import Path
15 import pandas as pd
---> 16 import statsmodels.api as sm
17 from deeplabcut.utils import auxiliaryfunctions, visualization
18 from deeplabcut.utils import frameselectiontools

/usr/local/lib/python3.6/dist-packages/statsmodels/api.py in ()
5 from . import tools
6 from .tools.tools import add_constant, categorical
----> 7 from . import regression
8 from .regression.linear_model import OLS, GLS, WLS, GLSAR
9 from .regression.recursive_ls import RecursiveLS

/usr/local/lib/python3.6/dist-packages/statsmodels/regression/init.py in ()
----> 1 from .linear_model import yule_walker
2
3 from statsmodels.tools._testing import PytestTester
4
5 all = ['yule_walker', 'test']

/usr/local/lib/python3.6/dist-packages/statsmodels/regression/linear_model.py in ()
38 import numpy as np
39 from scipy.linalg import toeplitz
---> 40 from scipy import stats
41 from scipy import optimize
42

/usr/local/lib/python3.6/dist-packages/scipy/stats/init.py in ()
343 from .stats import *
344 from .distributions import *
--> 345 from .morestats import *
346 from ._binned_statistic import *
347 from .kde import gaussian_kde

/usr/local/lib/python3.6/dist-packages/scipy/stats/morestats.py in ()
10 sqrt, ceil, floor, array, compress,
11 pi, exp, ravel, count_nonzero, sin, cos, arctan2, hypot)
---> 12 from numpy.testing.decorators import setastest
13
14 from scipy._lib.six import string_types

ModuleNotFoundError: No module named 'numpy.testing.decorators'

Any suggestions?

Also a sidenote -
on ubuntu 18.04
'sudo apt-get install nvidia-docker' seems to not work but 'sudo apt-get install nvidia-docker2' does the job!

Thank you so much! :)

pip3 install deeplabcut fails to get hdf5 version

Hi,

I'm trying to build deeplabcut for a non-Ubuntu machine (Linux Mint), which means non of the provided conda-env files are useful. So, I tried with

pip3 install deeplabcut
which failed with the following error message:

Collecting deeplabcut
  Using cached deeplabcut-2.1.5.2-py3-none-any.whl (385 kB)
Collecting intel-openmp
  Using cached intel_openmp-2020.0.133-py2.py3-none-manylinux1_x86_64.whl (919 kB)
Collecting opencv-python~=3.4
  Using cached opencv_python-3.4.8.29-cp37-cp37m-manylinux1_x86_64.whl (28.3 MB)
Collecting ipython
  Downloading ipython-7.11.1-py3-none-any.whl (777 kB)
     |████████████████████████████████| 777 kB 3.2 MB/s 
Collecting pyyaml>=5.1
  Using cached PyYAML-5.3.tar.gz (268 kB)
Requirement already satisfied: setuptools in ./lib/python3.7/site-packages (from deeplabcut) (45.1.0)
Collecting statsmodels==0.10.1
  Using cached statsmodels-0.10.1-cp37-cp37m-manylinux1_x86_64.whl (8.1 MB)
Collecting chardet
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting moviepy
  Downloading moviepy-1.0.1.tar.gz (373 kB)
     |████████████████████████████████| 373 kB 11.8 MB/s 
Collecting requests
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting scipy
  Downloading scipy-1.4.1-cp37-cp37m-manylinux1_x86_64.whl (26.1 MB)
     |████████████████████████████████| 26.1 MB 11.1 MB/s 
Collecting h5py~=2.7
  Downloading h5py-2.10.0-cp37-cp37m-manylinux1_x86_64.whl (2.9 MB)
     |████████████████████████████████| 2.9 MB 12.1 MB/s 
Collecting tables==3.4.3 
  Downloading tables-3.4.3.tar.gz (4.6 MB) 
     |████████████████████████████████| 4.6 MB 14.6 MB/s 
    ERROR: Command errored out with exit status 1: 
     command: /home/c3se/DLCut_virt_env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xs0d79ps/tables/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xs0d79ps/tables/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-xs0d79ps/tables/pip-egg-info 
         cwd: /tmp/pip-install-xs0d79ps/tables/ 
    Complete output (10 lines): 
    * Using Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
    * USE_PKGCONFIG: True 
    * Found conda env: ``/home/c3se/anaconda3`` 
    Traceback (most recent call last): 
      File "<string>", line 1, in <module> 
      File "/tmp/pip-install-xs0d79ps/tables/setup.py", line 597, in <module> 
        hdf5_version = get_hdf5_version(hdf5_header) 
      File "/tmp/pip-install-xs0d79ps/tables/setup.py", line 350, in get_hdf5_version 
        major_version = int(re.split("\s*", line)[2]) 
    ValueError: invalid literal for int() with base 10: 'd' 
    ---------------------------------------- 
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any possible solution?

Thanks, and best regards,
Soheil

Updating instructions for nvidia-docker 2

Recent versions of NVIDIA's Docker support integrate more smoothly with unpatched versions of Docker thanks to the fact that the Docker ecosystem has been opened up a bit and has been split more cleanly into different components serving different purposes. Given this, it would be nice to upgrade the instructions here to work with these newer versions of Docker. This may make it easier for users less immersed in the Docker ecosystem to get started pretty quickly with containers leveraging GPU support. Details about what this entails in the NVIDIA blog post below.

ref: https://devblogs.nvidia.com/gpu-containers-runtime/

docker is not running

OS : linux Ubuntu 18.04
NVIDIA driver: 430.26
CUDA 10.1

HI, it's me again. I followed the instructions and met the problem that I could not execute the docker just created. It prompted me that the docker was not running and noted exited. I was trying to restart it but no difference. I am just new to this, thanks for any help in advance.

Screenshot from 2019-08-09 13-32-37

Import deeplabcut fails with import error

I ran
make docker-build
and
make docker-run

Everything built without errors. However, when I use docker-run to get inside the container, start ipython and use import deeplabcut I get:

ImportError                               Traceback (most recent call last)
<ipython-input-1-cfa4f159dfc5> in <module>()
----> 1 import deeplabcut

~/anaconda3/lib/python3.6/site-packages/deeplabcut/__init__.py in <module>()
     28     else:
     29         mpl.use('Agg')
---> 30     from deeplabcut import generate_training_dataset
     31     from deeplabcut import refine_training_dataset
     32     from deeplabcut.generate_training_dataset import label_frames, dropannotationfileentriesduetodeletedimages, comparevideolistsanddatafolders, dropimagesduetolackofannotation

~/anaconda3/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/__init__.py in <module>()
     17 else:
     18     from deeplabcut.generate_training_dataset.auxfun_drag_label import *
---> 19     from deeplabcut.generate_training_dataset.labeling_toolbox import *
     20     from deeplabcut.generate_training_dataset.multiple_individual_labeling_toolbox import *
     21     from deeplabcut.generate_training_dataset.frame_extraction_toolbox import *

~/anaconda3/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py in <module>()
     25 import argparse
     26 from deeplabcut.generate_training_dataset import auxfun_drag_label
---> 27 from deeplabcut.utils import auxiliaryfunctions
     28 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
     29 from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar

~/anaconda3/lib/python3.6/site-packages/deeplabcut/utils/__init__.py in <module>()
----> 1 from deeplabcut.utils.make_labeled_video import *
      2 from deeplabcut.utils.auxiliaryfunctions import *
      3 from deeplabcut.utils.video_processor import *
      4 from deeplabcut.utils.plotting import *
      5 

~/anaconda3/lib/python3.6/site-packages/deeplabcut/utils/make_labeled_video.py in <module>()
     36 
     37 from deeplabcut.utils import auxiliaryfunctions
---> 38 from deeplabcut.pose_estimation_tensorflow.config import load_config
     39 from skimage.util import img_as_ubyte
     40 from skimage.draw import circle_perimeter, circle, line,line_aa

~/anaconda3/lib/python3.6/site-packages/deeplabcut/pose_estimation_tensorflow/__init__.py in <module>()
     17 from deeplabcut.pose_estimation_tensorflow.default_config import *
     18 from deeplabcut.pose_estimation_tensorflow.evaluate import *
---> 19 from deeplabcut.pose_estimation_tensorflow.predict_videos import *
     20 from deeplabcut.pose_estimation_tensorflow.test import *
     21 from deeplabcut.pose_estimation_tensorflow.train import *

~/anaconda3/lib/python3.6/site-packages/deeplabcut/pose_estimation_tensorflow/predict_videos.py in <module>()
     27 from deeplabcut.utils import auxiliaryfunctions
     28 import cv2
---> 29 from skimage.util import img_as_ubyte
     30 
     31 ####################################################

~/anaconda3/lib/python3.6/site-packages/skimage/__init__.py in <module>()
    156     except ImportError as e:
    157         _raise_build_error(e)
--> 158     from .util.dtype import *
    159 
    160 

~/anaconda3/lib/python3.6/site-packages/skimage/util/__init__.py in <module>()
      5 from .apply_parallel import apply_parallel
      6 
----> 7 from .arraycrop import crop
      8 from ._regular_grid import regular_grid, regular_seeds
      9 from .unique import unique_rows

~/anaconda3/lib/python3.6/site-packages/skimage/util/arraycrop.py in <module>()
      6 
      7 import numpy as np
----> 8 from numpy.lib.arraypad import _validate_lengths
      9 
     10 

ImportError: cannot import name '_validate_lengths'

There seems to be a version mismatch with skimage per: numpy/numpy#12744

I used conda update scikit-image which installed a new version (0.15.0) that now works but you might want to check to make sure you've pinned the correct one.

Import Tensorflow Failed due to missing libcuda.so.1 file

I was able to successfully build the docker image and run the container. However, when I try to import deeplabcut to check my installation, I get the following error:

stefan@d3f3c94e1afa:/$ cd home/
stefan@d3f3c94e1afa:/home$ export DLClight=True
stefan@d3f3c94e1afa:/home$ ipython
Python 3.6.3 (default, Oct 6 2017, 08:44:35)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import deeplabcut
DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)

ImportError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py in ()
57
---> 58 from tensorflow.python.pywrap_tensorflow_internal import *
59 from tensorflow.python.pywrap_tensorflow_internal import version
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py in ()
27 return _mod
---> 28 _pywrap_tensorflow_internal = swig_import_helper()
29 del swig_import_helper
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py in swig_import_helper()
23 try:
---> 24 _mod = imp.load_module('pywrap_tensorflow_internal', fp, pathname, description)
25 finally:
/usr/lib/python3.6/imp.py in load_module(name, file, filename, details)
242 else:
--> 243 return load_dynamic(name, filename, file)
244 elif type
== PKG_DIRECTORY:
/usr/lib/python3.6/imp.py in load_dynamic(name, path, file)
342 name=name, loader=loader, origin=path)
--> 343 return _load(spec)
344
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
in ()
----> 1 import deeplabcut
/usr/local/lib/python3.6/dist-packages/deeplabcut/init.py in ()
41 print("Project loaded in colab-mode. Apparently Colab has trouble loading statsmodels, so the smoothing & outlier frame extraction is disabled. Sorry!")
42 else:
---> 43 from deeplabcut.refine_training_dataset import extract_outlier_frames, merge_datasets
44 from deeplabcut.post_processing import filterpredictions, analyzeskeleton
45
/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/init.py in ()
18 from deeplabcut.refine_training_dataset.auxfun_drag import *
19
---> 20 from deeplabcut.refine_training_dataset.outlier_frames import *
/usr/local/lib/python3.6/dist-packages/deeplabcut/refine_training_dataset/outlier_frames.py in ()
15 import pandas as pd
16 import statsmodels.api as sm
---> 17 from deeplabcut.utils import auxiliaryfunctions, visualization
18 from deeplabcut.utils import frameselectiontools
19 import argparse
/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/init.py in ()
----> 1 from deeplabcut.utils.make_labeled_video import *
2 from deeplabcut.utils.auxiliaryfunctions import *
3 from deeplabcut.utils.video_processor import *
4 from deeplabcut.utils.plotting import *
5
/usr/local/lib/python3.6/dist-packages/deeplabcut/utils/make_labeled_video.py in ()
36
37 from deeplabcut.utils import auxiliaryfunctions
---> 38 from deeplabcut.pose_estimation_tensorflow.config import load_config
39 from skimage.util import img_as_ubyte
40 from skimage.draw import circle_perimeter, circle, line,line_aa
/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/init.py in ()
11 from deeplabcut.pose_estimation_tensorflow.dataset import *
12 from deeplabcut.pose_estimation_tensorflow.models import *
---> 13 from deeplabcut.pose_estimation_tensorflow.nnet import *
14 from deeplabcut.pose_estimation_tensorflow.util import *
15
/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/nnet/init.py in ()
12
13 """
---> 14 from deeplabcut.pose_estimation_tensorflow.nnet.losses import *
15 from deeplabcut.pose_estimation_tensorflow.nnet.net_factory import *
16 from deeplabcut.pose_estimation_tensorflow.nnet.pose_net import *
/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/nnet/losses.py in ()
3 https://github.com/eldar/pose-tensorflow
4 '''
----> 5 import tensorflow as tf
6 vers = (tf.version).split('.')
7 if int(vers[0])==1 and int(vers[1])>12:
/usr/local/lib/python3.6/dist-packages/tensorflow/init.py in ()
22
23 # pylint: disable=g-bad-import-order
---> 24 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
25 # pylint: disable=wildcard-import
26 from tensorflow.tools.api.generator.api import * # pylint: disable=redefined-builtin
/usr/local/lib/python3.6/dist-packages/tensorflow/python/init.py in ()
47 import numpy as np
48
---> 49 from tensorflow.python import pywrap_tensorflow
50
51 # Protocol buffers
/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py in ()
72 for some common reasons and solutions. Include the entire stack trace
73 above this error message when asking for help.""" % traceback.format_exc()
---> 74 raise ImportError(msg)
75
76 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

Could this be a problem with my cuda installation on my host machine? I have cuda 10 on my host machine and it looks like this container uses cuda 9.

Docker container exits instantly when run

I accidentally posted this here yesterday, but it is in fact an issue I encountered with the Docker for DLC2. My apologies for the confusion!

Error:
Docker container appears to exit instantly when run. Thus, cannot enter container normally via
GPU=0 bash ./dlc-docker run (...). Crash may be caused by wrong CUDA version for our GPU.

Issue appears similar to this for DLC1 or https://github.com/MMathisLab/Docker4DeepLabCut2.0/issues/5 for DLC2, but isn't resolved by adjusting the home directory. My chosen home directory does already exist, and is empty.

Server configuration:
Docker: version 18.09.1, build 4c52b90
GPUs: 2 x NVIDIA GeForce RTX 2080
GPU driver: version 410.79
CUDA: 10.0

Comments:
Our GPU might require CUDA 10.0 (as indeed installed on our server), instead of CUDA 9.0 (as present within the container for DLC2). Can I manually update CUDA, cuDNN and/or the GPU drivers within the container?

Steps to reproduce:

  1. Connected to server, ssh -X %SERVERNAME. Verified that docker is installed, as well as docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi, which downloaded a newer image. (Later repeated the entire process for 10.0, since that's the version installed on our server, with identical results.)

  2. Created desired home directory, mkdir $HOME/DeepLabCut, then mkdir $HOME/DeepLabCut/DeepHome.

  3. From within $HOME/DeepLabCut, successfully cloned, git clone https://github.com/MMathisLab/Docker4DeepLabCut2.0.

  4. From within $HOME/DeepLabCut/Docker4DeepLabCut2.0, successfully built image, docker image build -t $DLCUSER/deepdock . My chosen $DLCUSER is different from my user name on the network, $NETWORKUSER.

  5. Attempted to run container, GPU=0 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut/DeepHome --name deepdock $DLCUSER/deepdock.

  6. docker ps -a confirms that the container exited instantly:

CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS                     PORTS               NAMES
3666b6cbee76        $DLCUSER/deepdock   "/usr/local/bin/entr…"   3 seconds ago       Exited (1) 2 seconds ago                       deepdock
  1. Trying to enter the container via docker exec --user $DLCUSER -it deepdock /bin/bash returns the expected error: Error response from daemon: Container fbe0ff45cbb21225dcf51c88b157e1e0b40fd0e8d4bce7b69a4a9f53d1c54594 is not running.

Starting the docker container, error: invalid device: 1

Hi again,

Do you know what could be the problem with this error? It appears when I'm trying to start the docker container from image.

Thanks,

ebfmlab@ebfmlab:~/Docker4DeepLabCut2.0$ GPU=1 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker
ret run -d -p 2351:8888 -e USER_HOME=/home/ebfmlab/DeepLabCut --name containername dlc_username/dlcdocker run
1st CMD run

  • Setting user name to: ebfmlab
  • Setting user ID to: 1000
  • Setting user groups to: sudo
  • Setting password to: pw
  • Setting Notebook port binding to: 2351 (to set manually add -p 2351:8888 as flag)

You can now open the notebook on the host machine by directing your browser to

http://localhost:2351

1 nvidia-docker run -v /home/ebfmlab:/home/ebfmlab -p 51674:22 -p 2351:8888 -e USER_GROUPS=sudo -e USER=ebfmlab -e USER_ID=1000 -e USER_ENCRYPTED_PASSWORD=aa5V9MSdgw5ec -e USER_HOME=/home/ebfmlab -e GPU=1 -d -e USER_HOME=/home/ebfmlab/DeepLabCut --name containername dlc_username/dlcdocker
nvidia-docker | 2019/01/29 21:54:17 Error: invalid device: 1

Error installing docker on Jetson Nano

Hello,

I have been trying to set up Deeplabcut on my jetson nano to train a model to predict pupil size.
When running this command:
docker image build -t dlc_username/dlcdocker .
I get this error.
standard_init_linux.go:211: exec user process caused "exec format error"
It seems that the docker only exists for architecture x86_64 and since the jetson nano is in aarch64, it cannot build the image. Is it possible to have a version for aarch64?

Thank you in advance for your help

Can not proceed when building the Docker image

I am trying to install DeepLabCut on a server, but can not build the docker image. When I run the following command from the Dockerfile (docker image build -t dlc_username/dlcdocker .), I always get stuck on Step 5/12 : RUN apt-get update.

It seems that this package can not be downloaded, but do not know why. I also tried to run it on my computer (Linux Ubuntu 18.04), and encountered the same problem. Your support is highly appreciated.

图片

Failed building wheel for imagecodecs during docker image creation

Hi,

when creating the docker image on my computer (Ubuntu 16.04.6) I get the following error during step 10/13 (Step 10/13 : RUN pip3 install deeplabcut):

> Collecting imagecodecs>=2020.2.18 (from tifffile>=2019.7.26->scikit-image->deeplabcut)
>   Downloading https://files.pythonhosted.org/packages/75/95/3699360d15e5e5d450bbd16ea554fb185117947e76fc772078c4f59ae1c1/imagecodecs-2020.2.18.tar.gz (8.8MB)
> Requirement already satisfied: parso==0.1.1 in /usr/local/lib/python3.6/dist-packages (from jedi>=0.10->ipython->deeplabcut)
> Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython->deeplabcut)
> Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.6/dist-packages (from pexpect; sys_platform != "win32"->ipython->deeplabcut)
> Building wheels for collected packages: pyyaml, easydict, moviepy, proglog, imageio-ffmpeg, imagecodecs
>   Running setup.py bdist_wheel for pyyaml: started
>   Running setup.py bdist_wheel for pyyaml: finished with status 'done'
>   Stored in directory: /root/.cache/pip/wheels/a7/c1/ea/cf5bd31012e735dc1dfea3131a2d5eae7978b251083d6247bd
>   Running setup.py bdist_wheel for easydict: started
>   Running setup.py bdist_wheel for easydict: finished with status 'done'
>   Stored in directory: /root/.cache/pip/wheels/9a/88/ec/085d92753646b0eda1b7df49c7afe51a6ecc496556d3012e2e
>   Running setup.py bdist_wheel for moviepy: started
>   Running setup.py bdist_wheel for moviepy: finished with status 'done'
>   Stored in directory: /root/.cache/pip/wheels/a3/3c/07/45afe2bd5dbd3f935f445545d645f0f8c05d48340136367d45
>   Running setup.py bdist_wheel for proglog: started
>   Running setup.py bdist_wheel for proglog: finished with status 'done'
>   Stored in directory: /root/.cache/pip/wheels/65/56/60/1d0306a8d90b188af393c1812ddb502a8821b70917f82dcc00
>   Running setup.py bdist_wheel for imageio-ffmpeg: started
>   Running setup.py bdist_wheel for imageio-ffmpeg: finished with status 'done'
>   Stored in directory: /root/.cache/pip/wheels/a4/97/d4/c700927e4f2da1db33918b51d6a9eeaabc430f7ed8cb3fb362
>   Running setup.py bdist_wheel for imagecodecs: started
>   Running setup.py bdist_wheel for imagecodecs: finished with status 'error'
>   Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-o11004t_/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpn5slxnxbpip-wheel- --python-tag cp36:
>   running bdist_wheel
>   running build
>   running build_py
>   creating build
>   creating build/lib.linux-x86_64-3.6
>   creating build/lib.linux-x86_64-3.6/imagecodecs
>   copying imagecodecs/_imagecodecs.py -> build/lib.linux-x86_64-3.6/imagecodecs
>   copying imagecodecs/__init__.py -> build/lib.linux-x86_64-3.6/imagecodecs
>   copying imagecodecs/imagecodecs.py -> build/lib.linux-x86_64-3.6/imagecodecs
>   copying imagecodecs/__main__.py -> build/lib.linux-x86_64-3.6/imagecodecs
>   creating build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-lcms2 -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-bitshuffle -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-charls -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-zlib -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-blosc -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-openjpeg -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-jpeg -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-jpg_0xc3 -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-lz4 -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libtiff -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-zopfli -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libpng -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-fastlz -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-brotli -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libmng -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libwebp -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-zstd -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-bzip2 -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-zfp -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libaec -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-snappy -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-liblzma -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-lzf -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-giflib -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-jxrlib -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-libjpeg-turbo -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   copying imagecodecs/licenses/LICENSE-brunsli -> build/lib.linux-x86_64-3.6/imagecodecs/licenses
>   running build_ext
>   building 'imagecodecs._aec' extension
>   creating build/temp.linux-x86_64-3.6
>   creating build/temp.linux-x86_64-3.6/imagecodecs
>   x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.6m -I/tmp/pip-build-o11004t_/imagecodecs/.eggs/numpy-1.18.4-py3.6-linux-x86_64.egg/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-x86_64-3.6/imagecodecs/_aec.o
>   In file included from /tmp/pip-build-o11004t_/imagecodecs/.eggs/numpy-1.18.4-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1832:0,
>                    from /tmp/pip-build-o11004t_/imagecodecs/.eggs/numpy-1.18.4-py3.6-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:12,
>                    from /tmp/pip-build-o11004t_/imagecodecs/.eggs/numpy-1.18.4-py3.6-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,
>                    from imagecodecs/_aec.c:598:
>   /tmp/pip-build-o11004t_/imagecodecs/.eggs/numpy-1.18.4-py3.6-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
>    #warning "Using deprecated NumPy API, disable it with " \
>     ^
>   imagecodecs/_aec.c:602:20: fatal error: libaec.h: No such file or directory
>   compilation terminated.
>   error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>   
>   ----------------------------------------
>   Failed building wheel for imagecodecs
>   Running setup.py clean for imagecodecs
> Successfully built pyyaml easydict moviepy proglog imageio-ffmpeg
> Failed to build imagecodecs
> Installing collected packages: msgpack, numpy, msgpack-numpy, tabulate, tensorpack, pyyaml, numexpr, tables, networkx, PyWavelets, imageio, imagecodecs, tifffile, kiwisolver, matplotlib, scikit-image, Shapely, opencv-python, imgaug, easydict, certifi, chardet, intel-openmp, urllib3, idna, requests, proglog, imageio-ffmpeg, moviepy, h5py, patsy, pandas, statsmodels, ruamel.yaml.clib, ruamel.yaml, deeplabcut
>   Found existing installation: numpy 1.14.1
>     Uninstalling numpy-1.14.1:
>       Successfully uninstalled numpy-1.14.1


Then it proceeds to install a bunch of other stuff, and it stops with:

> building 'imagecodecs._aec' extension
>     creating build/temp.linux-x86_64-3.6
>     creating build/temp.linux-x86_64-3.6/imagecodecs
>     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.6m -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-x86_64-3.6/imagecodecs/_aec.o
>     In file included from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
>                      from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
>                      from /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
>                      from imagecodecs/_aec.c:598:
>     /usr/local/lib/python3.6/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
>      #warning "Using deprecated NumPy API, disable it with " \
>       ^
>     imagecodecs/_aec.c:602:20: fatal error: libaec.h: No such file or directory
>     compilation terminated.
>     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>     
>     ----------------------------------------
> Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-o11004t_/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-cz_gglay-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-o11004t_/imagecodecs/
> You are using pip version 9.0.1, however version 20.1 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
> The command '/bin/sh -c pip3 install deeplabcut' returned a non-zero code: 1

Thank you for your support!

GUI Docker container unable to import deeplabcut in Jupyter notebook because of matplotlib import call

Operating system and DeepLabCut version

Please state your operating system, env, and which version of DeepLabCut you are using:
Example: Ubuntu 16.04 LTS, with an Anaconda Env, & DeepLabCut1.x or 2.x.

DeepLabCut GUI Docker on GPU Server (Ubuntu)
Ubuntu 18.04.1 LTS

Describe the problem:

I prepared the server and installed the docker as described in the instructions.

Then I opened a Jupyter Notebook and tried to import deeplabcut, and there it crashes due to an ImportError.

`---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)
<ipython-input-9-63632350fff9> in <module>()
      1 import tensorflow
----> 2 import deeplabcut

/home/ubuntu/anaconda3/lib/python3.6/site-packages/deeplabcut/__init__.py in <module>()
     27     else:
     28         mpl.use('Agg')
---> 29     from deeplabcut import generate_training_dataset
     30     from deeplabcut import refine_training_dataset
     31     from deeplabcut.generate_training_dataset import label_frames, dropannotationfileentriesduetodeletedimages, comparevideolistsanddatafolders

/home/ubuntu/anaconda3/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/__init__.py in <module>()
     17 else:
     18     from deeplabcut.generate_training_dataset.auxfun_drag_label import *
---> 19     from deeplabcut.generate_training_dataset.labeling_toolbox import *
     20     from deeplabcut.generate_training_dataset.frame_extraction_toolbox import *
     21 

/home/ubuntu/anaconda3/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py in <module>()
     25 import argparse
     26 from deeplabcut.generate_training_dataset import auxfun_drag_label
---> 27 from deeplabcut.utils import auxiliaryfunctions
     28 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
     29 from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar

/home/ubuntu/anaconda3/lib/python3.6/site-packages/deeplabcut/utils/__init__.py in <module>()
----> 1 from deeplabcut.utils.make_labeled_video import *
      2 from deeplabcut.utils.auxiliaryfunctions import *
      3 from deeplabcut.utils.video_processor import *
      4 from deeplabcut.utils.plotting import *
      5 

/home/ubuntu/anaconda3/lib/python3.6/site-packages/deeplabcut/utils/make_labeled_video.py in <module>()
     32     mpl.use('WxAgg') #TkAgg
     33 else:
---> 34     mpl.use('TkAgg')
     35 import matplotlib.pyplot as plt
     36 

/home/ubuntu/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py in use(arg, warn, force)
   1389         if force:
   1390             from matplotlib.pyplot import switch_backend
-> 1391             switch_backend(name)
   1392     # Finally if pyplot is not imported update both rcParams and
   1393     # rcDefaults so restoring the defaults later with rcdefaults

/home/ubuntu/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py in switch_backend(newbackend)
    220                 "Cannot load backend {!r} which requires the {!r} interactive "
    221                 "framework, as {!r} is currently running".format(
--> 222                     newbackend, required_framework, current_framework))
    223 
    224     rcParams['backend'] = rcParamsDefault['backend'] = newbackend

ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running`

DLC 2.2.b7 Linux 18.04 (Ubuntu) - Docker: ImportError: cannot import name '_log'

Hi,
M system:

Linux Ubuntu 18.04
DLC 2.2.b7
RTX 2060

I'm getting the following error message after >> import deeplabcut as dlc :
`---> 20 from matplotlib.axes._axes import _log as matplotlib_axes_logger
21
22 from deeplabcut.utils import auxiliaryfunctions

ImportError: cannot import name '_log'`

while I'm in Docker (btw: I updated DLC inside Docker).

import DeepLabCut fails with importerror on cv2

For whatever reason, whenever I try importing deeplabcut after starting the container, I get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-5cd872217571> in <module>
----> 1 import deeplabcutcore

/usr/local/lib/python3.6/dist-packages/deeplabcutcore/__init__.py in <module>
     18 
     19 
---> 20 from deeplabcutcore.create_project import create_new_project, create_new_project_3d, add_new_videos, load_demo_data
     21 from deeplabcutcore.create_project import create_pretrained_project, create_pretrained_human_project
     22 from deeplabcutcore.generate_training_dataset import extract_frames, select_cropping_area

/usr/local/lib/python3.6/dist-packages/deeplabcutcore/create_project/__init__.py in <module>
----> 1 from deeplabcutcore.create_project.new import create_new_project
      2 from deeplabcutcore.create_project.new_3d import create_new_project_3d
      3 from deeplabcutcore.create_project.add import add_new_videos
      4 from deeplabcutcore.create_project.demo_data import load_demo_data
      5 from deeplabcutcore.create_project.modelzoo import create_pretrained_human_project, create_pretrained_project

/usr/local/lib/python3.6/dist-packages/deeplabcutcore/create_project/new.py in <module>
     11 import os
     12 from pathlib import Path
---> 13 import cv2
     14 from deeplabcutcore import DEBUG
     15 import shutil

~/.local/lib/python3.6/site-packages/cv2/__init__.py in <module>
      3 import sys
      4 
----> 5 from .cv2 import *
      6 from .data import *
      7 

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

I know this is in relation to OpenCV, and a couple days prior, I'd tried upgrading it from within the running Docker container, which is when I started encountering the error. Since then, I've tried stopping and removing the container, I've tried deleted and recloning the git, I tried replacing "pip3 install deeplabcut" with "pip3 install deeplabcutcore", but the error keeps occurring. I don't know what to do, please help.

ModuleError

Hi
I followed all the steps for pulling the image, building it and then starting it. I started the docker, passed appropriate ports and initiated ipython kernel, but when I tried to import deeplabcut, I encountered the following error
In [1]: import deeplabcut

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import deeplabcut

/usr/local/lib/python3.6/dist-packages/deeplabcut/init.py in ()
31 else:
32 mpl.use('TkAgg')
---> 33 from deeplabcut import generate_training_dataset
34 from deeplabcut import refine_training_dataset
35

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/init.py in ()
13 pass
14 else:
---> 15 from deeplabcut.generate_training_dataset.auxfun_drag_label import *
16 from deeplabcut.generate_training_dataset.labeling_toolbox import *
17 from deeplabcut.generate_training_dataset.frame_extraction_toolbox import *

/usr/local/lib/python3.6/dist-packages/deeplabcut/generate_training_dataset/auxfun_drag_label.py in ()
16
17 import numpy as np
---> 18 import wx
19
20 class DraggablePoint:

ModuleNotFoundError: No module named 'wx

help .......

Contner not running

Hello,

Me again sorry I'm totally new at using docker. Each time I want to execute the docker to train the network it says that is not running.

ebfmlab@ebfmlab:~$ docker exec --user $USER -it containername /bin/bash
Error response from daemon: Container ce856759f3c87888b9e41647094839152b1fdc429354e7989165698524cf2d1d is not running

Best.

Error installing DeepLabCut docker in AWS

Hi,

I followed the instructions on GitHub - DeepLabCut/Docker4DeepLabCut2.0: Docker container for running DeepLabCut 2.0+ (linux support only)

I tried to run the command below:

GPU=1 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker

And I received the following error:

1 nvidia-docker run -v /home/ubuntu:/home/ubuntu -p 55187:22 -p 2351:8888 -e USER_GROUPS=sudo -e USER=ubuntu -e USER_ID=1000 -e USER_ENCRYPTED_PASSWORD=aa5V9MSdgw5ec -e USER_HOME=/home/ubuntu -e GPU=1 -e DISPLAY= -d -e USER_HOME=/home/ubuntu/DeepLabCut --name MyTestContainer dlc_username/dlcdocker

3be1723913b655ae06a3b8b0bdb43503fdcfc9316c73f665bfab18c645be9c0d

docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: Running hook #1:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: device error: 1: unknown device: unknown.

I appreciate any help you can provide.
Shachaf.

Error building docker image

Hi,
I could really use some help to find the reason for this error. I'm trying to create the Docker environment for deeplabcut.

Thanks,

ebfmlab@ebfmlab-desktop:~/Docker4DeepLabCut2.0$ docker image build -t dlc_username/dlcdocker .
Sending build context to Docker daemon 534kB
Step 1/12 : FROM python:3
---> 7c5fd2af3815
Step 2/12 : RUN pip install imageio
---> Running in e072bb04427e
Collecting imageio
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5825859860>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/imageio/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f58258596d8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/imageio/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5825859588>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/imageio/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f58258591d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/imageio/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f58240f62e8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/imageio/
Could not find a version that satisfies the requirement imageio (from versions: )
No matching distribution found for imageio
The command '/bin/sh -c pip install imageio' returned a non-zero code: 1

tensorflow installed with pip not pip3

Seems tensorflow is installed with pip not pip3 so all other dependencies are in the python3 version, tensorflow-gpu==1.8 is in just python2. Probably due to some package pulling in a dependency python3 does have a tensorflow 1.5.0 version so its possible to still run deeplabcut. Is there a reason for this setup? Should tensorflow-gpu==1.8 use pip3 to install?

Docker installation error: No matching distribution found for intel-openmp (from deeplabcut)

Was using the latest Dockerfile and got this error:

ERROR: Could not find a version that satisfies the requirement intel-openmp (from deeplabcut) (from versions: none)
ERROR: No matching distribution found for intel-openmp (from deeplabcut)
The command '/bin/sh -c pip3 install deeplabcut' returned a non-zero code: 1

I saw in other posts that this error pops up during installation in MacOS systems. But I am installing it on a Docker (on an Ubuntu machine, don't know if that even matters)

Any pointers?

Ubuntu with GPU Docker: “no matching entries in passwd file”

Describe the bug

I am running docker in ubuntu 18.04, with a GPU Nvidia. nvidia-. The docker image was built with no errors. When I run

GPU=0 bash ./dlc-docker run -d -p 2351:8888 -e USER_HOME=$HOME/DeepLabCut --name containername dlc_username/dlcdocker

I get no error message. But when I run:

docker exec --user $USER -it containername /bin/bash

I get:

Error response from daemon: Container b6761d046e4e4e104c2d4bdbaf52528a59bcd171e4f5ca9a652248be05a4248c is not running

I think the docker exits automatically when I run it. Because when I run the two commands in chain (I have to first remove the container for this), I get an error message:

unable to find user alvaro: no matching entries in passwd file

I would appreciate a lot some advice on this.

Desktop:

  • OS: Ubuntu 18.04 with GPU Nvidia GTX 1060
  • DeepLabCut Version: the one in the current Docker container repo

Additional context
I have never used Docker containers before. I posted it on image.sc but they told me it was not related to image analysis. They suggested to just restart the docker engine, based in this open bug in Docker but it did not work.

Python 3.6 PPA removed from public access

Hi,

I get the following error when I tried to build the container from the Dockerfile:

W: The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial Release' does not have a Release file.
E: Failed to fetch http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found

Seems that the Python 3.6 PPA has been removed from public access: https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.