sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
279 stars 138 forks source link

Linux/docker support #171

Open A-Telfer opened 2 years ago

A-Telfer commented 2 years ago

"SimBA is written for Microsoft Windows. We may be able to provide support and advice for specific use instances, especially if it benefits multiple users and advances the scope of SimBA"

I wanted to voice my interest in a Linux/docker version :)

In our case we have a lab computer built for machine learning and a number of remote servers. In order to keep the environments the same we run linux on all of them and docker (docker has better GPU support for linux compared to on windows). From my understanding this is a common setup for labs doing a lot of computational work.

DeepLabCut offers a docker environment now that can launch GUIs, I find it really made things easier for me to install it on a number of computers. It would be really cool to see this in SimBA too

sgoldenlab commented 2 years ago

Thanks @A-Telfer! It's on the list and will give it a go and let you know.

A-Telfer commented 2 years ago

Awesome!! I can contribute if there's a list of things that need to be refactored

sgoldenlab commented 2 years ago

Excellent... as I've asked the lab for help and got absolute silence in response :) Not sure how this is best done... is the docker compose yaml something that can be chucked in with the pip package? I push some smaller fixes to pip multiple times a week, and don't want to build image myself each time.

A-Telfer commented 2 years ago

I'm not sure about that, looking at how DLC does it they same to just have a really simple bash script that downloads the docker image from dockerhub.

If you don't want to explicitly create a new docker image every time, you could add a git hook to upload a new docker image to docker:latest automatically

How much needs to be changed for it to work on linux though?

A-Telfer commented 2 years ago

Edit: might be wrong about this, I see some docker build commands now so you could potentially just throw all this into pypi

e.g. https://github.com/DeepLabCut/DeepLabCut/blob/master/docker/deeplabcut_docker.sh#L118

sgoldenlab commented 2 years ago

Yes, that was what came to mind: throw the compose and whatever else is needed into the pypi, and give the user the commands for creating and loading image?

For linux compatibility: very little, I run it regularly on mac and I have sorted most or all legacy path calling commands that were not stable on mac/linux. The simba-uw-tf-dev should be good.

A-Telfer commented 2 years ago

That's great!

It worked for me on ubuntu, the only change was that I had to conda install wxPython before pip install simba-uw-tf-dev