Code Monkey home page Code Monkey logo

gpufun's Introduction

Interactive GPU prototyping on Sockeye

Setup SSH

  1. Setup a password manager to avoid having to type your CWL password every time
  2. Make sure Sockeye connection sharing is setup. See relevant section of Sockeye doc. The key info is that you should have the following in your laptop's ~/.ssh/config file (~ mean home directory):
Host s
    HostName sockeye.arc.ubc.ca
    User mycwl
    ControlMaster auto
    ControlPath ~/.ssh/ssh_mux_%h_%p_%r
  1. Open the UBC VPN and a terminal window and login with ssh s, do the 2-factor auth.
  2. Put that terminal aside and don't touch it. As long as it is open, other terminals can be opened without the 2 step auth (required for VS Code remote to work).

Setup remote VS Code

  1. Open VS Code and click on the lower right icon >< to start a remote VS Code running on Sockeye.
  2. For the hostname, just type s
  3. Once you are in, use the terminal in VS Code, open it with apple/control with "`"

Basic Sockeye setup

  1. Create the directory /scratch/st-alexbou-1/[your username]
  2. Download julia and install in your home dir, e.g. in /home/[your username]/bin/julia-1.xx.x
  3. Edit ~/.bash_profile to add:
export PATH=$PATH:/home/[your username]/bin/julia-1.10.2/bin

export JULIA_PKG_DEVDIR=/scratch/st-alexbou-1/[your username]/
export JULIA_DEPOT_PATH=/scratch/st-alexbou-1/[your username]/depot
  1. Test julia with julia then you will need this single package globally ] add Revise (others are better to install in a project specific manner) then exit()
  2. Edit ~/.bashrc to add
alias j='julia --banner=no --load /home/[your username]/julia-start.jl --project=@. ' 
alias interact='salloc --time=3:00:00 --mem=16G --nodes=1 --ntasks=2 --account=st-alexbou-1'
alias ginteract='salloc --account=st-alexbou-1-gpu --partition=interactive_gpu --time=1:0:0 -N 1 -n 2 --mem=8G --gpus=1'
  1. Create ~/julia-start.jl
println("Active project: $(Base.active_project())")
println("Loading Revise...")
using Revise

Setup this repo

  1. Clone this repo, i.e. cd /scratch/st-alexbou-1/[your username], git clone https://github.com/alexandrebouchard/gpufun.git, cd in it.
  2. Open two terminals in VS code:
    • One will be in the head node. Use for anything that needs network access (package install in particular). Open julia with j
    • One will be a GPU node that does not have internet access. In that terminal, type ginteract to start the GPU node, then j.
  3. In the head node terminal, setup the Julia dependencies with ] instantiate

Test your setup

In the GPU node's julia: include("test.jl")

gpufun's People

Contributors

alexandrebouchard avatar

Watchers

 avatar

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.