Skip to content

dklesev/google-cloud-deep-learning-kit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud Deep Learning Kit

This repository aims to create a GPU instance with Jupyter, Tensorflow and Keras on google cloud platform in an instant.

Overview

Requirements

  • make
  • Google Cloud SDK
  • Docker

Life Cycle to Use this Kit

  1. Create an instance with make create-instance
  2. Run jupyter on the instance with make run-jupyter
  • It may takes 5 minutes or so.
  1. Install python libraries with make pip-install
  • Put libraries you want to install in ./requirements.txt
  1. Upload files to the instance with make upload-files.
  2. Make ssh tunnel to the instance with make ssh-tunnel
  3. Access jupyter via your web browser
  • Default: http://localhost:18888
  1. Download outputs with make download-outputs
  2. Delete the instance with make delete-instance

Commands Reference

Create a GCP instance with GPU

It may take 5 minutes or so to finish to execute the startup script to install the require environment in your instance.

make create-instance \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx

Run Jupyter as a docker container

make run-jupyter \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx

SSH tunnel

In order to access the jupyter which you launched, you have to have a SSH tunnel. When you got it, you can access http://localhost:18888 via a web browser on your local machine. When you don't set any value with make ssh-tunnel, the port is the default value. The default of JUPYTER_PORT is 18888.

make ssh-tunnel \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx \
  JUPYTER_PORT=18888

Delete a instance you created

make delete-instance \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx

Install python libraries

make pip-install \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx

Upload your files

make upload-files \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx \
  FROM=/path/to/your/files

Download ouputs

make download-outputs \
  INSTANCE_NAME="test-gpu-instance" \
  GCP_PROJECT_ID=xxx-xxx-xxx \
  TO=/path/to/your/destination

Links

About

Create a GPU instance on GCP with Jupyter + Keras + Nvidia Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 43.6%
  • Shell 41.4%
  • Python 15.0%