Git Product home page Git Product logo

gpu-mux's Introduction

GPUMux

GPUMux is a scheduler for CUDA GPU python jobs. This is not an officially supported Google product.

You let it know what GPUs to use and it will schedule tasks on them for you, always maximizing the resources. It lets your spawn tasks directly from the web browser and also permits to track progress, errors, logs.

If the instance is rebooted or shut down, the jobs are restarted when you launch GPUMux.

Setup

pip3 install --upgrade gpumux

Usage

Important: Make sure the port you use is not open to the world since GPUMux lets you run arbitrary commands, anyone connecting to the port can run arbitrary commands. You can verify this easily by checking that you cannot access GPUMux remotely without ssh port forwarding.

In the folder you want to run jobs in, start GPUMux:

# On your remote machine where the tasks will run.
gpumux --port 3390 --path <path where to run jobs> --py <path to your custom python>

This command launches GPUMux in the local folder.

  • port is the port to run on.
  • path is the path where you jobs will run and executable(s) will be found.
  • py is the python interpreter to use
    • Defaults installs are /env/bin/python or /env/bin/python3.
    • For Conda, type which python in your Conda environment.
    • For virtualenv, type which python in your virtualenv.

If you're running on cloud, you'll need to forward the port to your local machine:

# Run on your local machine.
ssh -L 3390:localhost:3390 username@instance

If you're running multiple instances, you will want to forward to different local ports:

# Run each on command in a different terminal on your local machine.
ssh -L 3390:localhost:3390 username1@instance1
ssh -L 3391:localhost:3390 username2@instance2
...

Then simply point your browser to the port:

# On your local machine.
http://localhost:3390
# And if you have more.
http://localhost:3391

Files

Files are saved in a locally created gpumux folder. You can see the logs of your past runs, status codes, commands.

Jobs

If you wish to, you can access your running jobs with the command screen:

screen -dr gpumux_<job id>

gpu-mux's People

Contributors

david-berthelot avatar nottombrown 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gpu-mux's Issues

GPU-mux on docker

Is there any way to run gPU-mux on docker container which built in a remote server? Thanks.

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.