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

Create an extension for the Data Science VM to install the OKPy client #6

Open
marrobi opened this issue May 1, 2018 · 7 comments
Open
Assignees

Comments

@marrobi
Copy link
Collaborator

marrobi commented May 1, 2018

No description provided.

@TempestVanSchaik
Copy link
Collaborator

TempestVanSchaik commented May 1, 2018

  • Get rid of period in OK.py name

  • check status file on Linux VM for the deployment error

  • Edit template to create Windows VM

  • check OK.py client works and connect to OK server

@TempestVanSchaik
Copy link
Collaborator

TempestVanSchaik commented May 2, 2018

How to install OKpy on Windows (in an Anaconda environment using Anaconda prompt):

conda create --name OKenv
activate OKenv
conda install pip
pip install -r https://raw.githubusercontent.com/Cal-CS-61A-Staff/ok-client/master/requirements.txt
conda install ipykernel
python -m ipykernel install --user --name myenv --display-name "OKenv"

conda install jupyter
jupyter notebook #make sure to select Kernel>change kernel and select OKenv

@taupalosaurus
Copy link

Same on a linux DSVM inside a venv:

#!/bin/sh

export ENV_NAME=okpyenv2

python3 -m venv $ENV_NAME --without-pip
source $ENV_NAME/bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
deactivate

source $ENV_NAME/bin/activate
wget https://raw.githubusercontent.com/Cal-CS-61A-Staff/ok-client/master/requirements.txt
pip install -r requirements.txt
pip install -U okpy

#test
python -c "from client.api.notebook import Notebook"
deactivate

@taupalosaurus
Copy link

At this stage, linux deployment script is broken. Several options were considered, none works so far

  • install directly with pip fails because of permissions

  • creating a venv fails because I can't manage to get it installed in the right location with the right permissions

  • within a conda env fails: root is python2 and python3 is required apparently; py35 didn't work for some reason, creating an ad hoc env failed for some other reason

@taupalosaurus
Copy link

How to setup the jupyter server on linux

# activate venv
source ~/okpyenv2/bin/activate

# create custome python kernel corresponding to the venv
pip install ipykernel
python -m ipykernel install --user --name okpyenv2 --display-name "Python okpy"

# create minimal files to use jupyter as server and override some machine-wide settings
# TODO these should be improved
jupyter-notebook --generate-config
jupyter-notebook password

jupyter-notebook --no-browser --notebook-dir '/home/barral/ese' --port 9999 --ip 0.0.0.0
# then go to https://ip.of.the.vm:9999 and bypass dodgy certificate warning

@marrobi
Copy link
Collaborator Author

marrobi commented May 29, 2018

@TempestVanSchaik what was the last status of this, are we in a position to do a PR back to the DS VM repo? Thanks.

@TempestVanSchaik
Copy link
Collaborator

Hi @marrobi I'll wrap this up today and tomorrow

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

No branches or pull requests

3 participants