Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a convenient Docker #322

Merged
merged 40 commits into from
Mar 5, 2023
Merged

Conversation

bruAristimunha
Copy link
Collaborator

This pull request adds a Dockerfile to the MOABB repository, allowing users to easily build and run the MOABB code in a containerized environment.

The Dockerfile is based on one of the latest Pytorch images from Nvidia and installs all necessary dependencies for running MOABB. This pull request also creates a convenient script to include instructions for building and running MOABB using Docker.

I understand that the Nvidia image is the best choice for performance, and for the plan to add deep learning models in moabb, but this choice may add the step of logging into the Nvidia/torch hub with Docker.

[WIP] Script to run the moabb/run.py
[WIP] Increase description

@bruAristimunha bruAristimunha marked this pull request as draft January 23, 2023 23:59
@bruAristimunha bruAristimunha self-assigned this Jan 24, 2023
@bruAristimunha
Copy link
Collaborator Author

bruAristimunha commented Jan 24, 2023

Hey there! I've made some changes to the script and Dockerfile that should make them a lot more readable and easy to work with. In the script, I've defined all the variables in one place and used string concatenation to make the command more compact. I've also broken the command into multiple lines for better readability.

For the Dockerfile, I've made some changes to reduce the final size, by chaining multiple commands in one line. I've also added an environment variable and copied the current directory and a requirements file to the container, and set the working directory.

I will run the Dockerfile in my infra to see if I got the same results as report in wiki.

@bruAristimunha
Copy link
Collaborator Author

Hi @Div12345,

Can you build/run/reproduce the docker script and see if everything is working?

@bruAristimunha bruAristimunha changed the title [WIP] Adding a convince Docker [WIP] Adding a convenient Docker Jan 24, 2023
docker/meta_requirements.txt Outdated Show resolved Hide resolved
docker/run_docker.sh Outdated Show resolved Hide resolved
docker/run_docker.sh Outdated Show resolved Hide resolved
moabb/run.py Outdated Show resolved Hide resolved
@bruAristimunha
Copy link
Collaborator Author

Hi @Div12345 and @sylvchev!

Minor update, I implemented all the points.

I managed to run on the server to that I have access. In the test with one dataset (Cho), something is running. I left it running to download all the datasets, and then I will do a small stress test to run with as much CPU as possible.

Can you check on your side, @Div12345 or @sylvchev? I added the instruction sequence in the README.

@bruAristimunha bruAristimunha changed the title [WIP] Adding a convenient Docker Adding a convenient Docker Jan 26, 2023
@bruAristimunha
Copy link
Collaborator Author

bruAristimunha commented Jan 30, 2023

Small update:

Now, we have the based image in the docker hub =)

I put it in that repository for now. Eventually, we will have to migrate to an organization account, but this involves costs, $$

https://hub.docker.com/r/baristimunha/moabb

disclaimer: ignore the different user, someone configured the global user on the server.

@bruAristimunha bruAristimunha requested review from salimkhazem and removed request for Div12345 February 6, 2023 17:09
Copy link
Member

@sylvchev sylvchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is working fine on the cluster and on my machine.

@bruAristimunha bruAristimunha marked this pull request as ready for review March 1, 2023 14:28
@sylvchev sylvchev merged commit 1258c68 into NeuroTechX:develop Mar 5, 2023
@sylvchev
Copy link
Member

sylvchev commented Mar 5, 2023

Thank you so much @bruAristimunha for your work!

@bruAristimunha bruAristimunha deleted the docker branch June 8, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants