# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# # Training models on Paperspace with nvidia docker
#
# What is Paperspace?
#
# - Easy way to train your Deep Learning models on cloud GPUs if you don't have one already
# - Cheap cloud GPUs
# - Trial GPU hours
#
# # Introduction
#
# How do you get started?
#
# https://www.youtube.com/watch?v=swXhAI6DF0E
#
# #### ^ Follow this tutorial but 
#
# - Create a machine using *Ubuntu 16.04* template
# - Choose a machine type with GPU
#
#
# Once you have created a machine, you should have recieved a root user password from Paperspace in your email.

# # Installing nvidia-docker
#
# Why nvidia-docker?
#
# - It is the best way to run our models in consistent environment as our local environment
# - It is very easy to get started
#
#
# ##### Steps
#
# - So far you must have created a GPU enabled Ubuntu 16.04 machine
# - Run below command to install nvidia-docker + docker
#
# ```bash
# wget -O - -q 'https://gist.githubusercontent.com/dte/8954e405590a360614dcc6acdb7baa74/raw/d1b5a01ed0b9252654016d2a9a435dc8b4c045e7/install-CUDA-docker-nvidia-docker.sh' | sudo bash
# ```
#
# - Then you must restart your machine
#
# ```bash
# sudo shutdown -r now
# ```

# # Training || running Jupyter Notebook || just bash
#
# #### 1. Jupyter notebook
#
# ```bash
# sudo nvidia-docker run --rm --name tf-notebook -p 8888:8888 -p 6006:6006 gcr.io/tensorflow/tensorflow:latest-gpu jupyter notebook --allow-root
# ```
#
# - Note that you must enable **Public IP* to acce
#
#
# #### 2. Python file
#
# ```bash
# sudo nvidia-docker run -d -it -v $(pwd)/030-chatbot:/notebooks -v /inputs:/inputs -v /output:/output tensorflow/tensorflow:1.0.0-gpu python chatbot_simple.py
# ```
#
# Above command will do
#
# - Run a container in daemonised mode
# - Interactive shell enabled
# - Mount `030-chatbot`, `/inputs` and `/output` folders from host
# - Run `python chatbot_simple.py`
# - Create a container using `tensorflow:1.0.0-gpu
#
#
# #### 3. TF container bash access
#
#
# TF 1.0.0 version
#
# ```bash
# sudo nvidia-docker run -it tensorflow/tensorflow:1.0.0-gpu bash
# ```
#
# TF latest version
#
# ```bash
# sudo nvidia-docker run -it tensorflow/tensorflow:latest-gpu bash
# ```
#

StarcoderdataJupyterScriptsDedupFiltered