mirror of
https://github.com/TomHodson/tomhodson.github.com.git
synced 2025-06-26 10:01:18 +02:00
write conda setup
This commit is contained in:
parent
fa16c0b067
commit
9ef61c52c3
@ -1,19 +1,72 @@
|
||||
---
|
||||
layout: single
|
||||
title: "Draft Post"
|
||||
title: "My Jupyter and Conda setup"
|
||||
header:
|
||||
teaser: "unsplash-gallery-image-2-th.jpg"
|
||||
categories:
|
||||
- Jekyll
|
||||
tags:
|
||||
- edge case
|
||||
---
|
||||
Monocle ipsum dolor sit amet handsome pariatur aliqua, hub remarkable irure commodo classic deserunt bespoke. Sunt commodo signature, Swiss minim flat white Tsutaya excepteur artisanal et Nordic laborum joy ANA. Beams mollit exquisite Ginza efficient dolore qui Comme des Garçons Winkreative Lufthansa bulletin global. Iconic sed liveable duis. Mollit dolore eu laboris Comme des Garçons hub pintxos sed eiusmod tote bag Shinkansen nisi consectetur pariatur. Nordic international quis finest Baggu dolore, bureaux hub hand-crafted ut joy sint Airbus A380.
|
||||
|
||||
Conversation handsome hub cosy, enim emerging sed K-pop velit Gaggenau charming proident et boulevard ryokan. Remarkable airport deserunt international est, nulla minim magna emerging discerning in exclusive dolor. Commodo dolore deserunt cosy, global Nordic culpa uniforms signature charming. Smart ryokan commodo, eiusmod global occaecat incididunt aliqua Beams. Boulevard conversation excepteur finest Swiss non veniam Comme des Garçons essential artisanal. Destination Scandinavian international, anim Boeing 787 in duis Baggu irure essential.
|
||||
## My conda setup
|
||||
|
||||
Fugiat exclusive laborum, Gaggenau ad Winkreative sharp elit labore. Remarkable officia ryokan Boeing 787, consectetur boutique Nordic Singapore espresso elit iconic perfect izakaya soft power excepteur. Ut veniam carefully curated K-pop dolore, uniforms in voluptate. Craftsmanship Ettinger Lufthansa sophisticated esse boutique veniam exquisite. Aute cillum bespoke, intricate consectetur in exquisite international lovely bulletin irure Washlet Gaggenau deserunt. Efficient eu quality of life wardrobe labore, dolor emerging airport concierge reprehenderit izakaya dolore liveable Baggu.
|
||||
I really like working in Jupyterlab but getting it to work nicely is always a bit challenging, these are my notes for roughly how I have it set up.
|
||||
|
||||
Commodo elegant essential consectetur Gaggenau culpa consequat id sophisticated St Moritz sunt conversation duis non velit. Nulla business class non ut Marylebone ANA soft power fugiat carefully curated. Bureaux sed punctual handsome Washlet impeccable hand-crafted aute extraordinary tote bag enim boulevard soft power sleepy. Dolore conversation irure Zürich the best adipisicing, vibrant finest hub anim premium aliqua. Cupidatat smart international, bureaux Baggu id efficient punctual. Tempor nulla flat white enim, K-pop incididunt elit efficient Toto uniforms concierge discerning. Concierge sleepy extraordinary, deserunt Melbourne commodo Nordic Winkreative Washlet Ginza exercitation espresso.
|
||||
### Conda
|
||||
I use miniconda3 with the package directory set up to point to somewhere other than the home directory because the university system I'm working on only gives a small amount of space in your home directory.
|
||||
|
||||
Tsutaya sed in business class sharp. Do Beams in adipisicing Lufthansa. Business class occaecat Melbourne, irure Singapore commodo espresso carefully curated quis quality of life adipisicing. Impeccable laborum efficient classic proident in. Beams Helsinki ullamco Marylebone dolore sophisticated concierge Muji anim duis joy ut. Comme des Garçons aute Muji in aliquip ryokan soft power Nordic essential ANA culpa elegant.
|
||||
My ~/.condarc contains:
|
||||
```
|
||||
channel_priority: strict
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
```
|
||||
channel_priority: strict is supposed to speed up conda complicated dependency resolution system, and I heard on the grapevine that conda-forge packages tend to be more up to date than the ones in default so I've switched the priority.
|
||||
|
||||
I then have a "base" environment where I've install jupyterlab,
|
||||
|
||||
Hint: you can use `conda env export --from-history` to see the packages you actually installed into a conda environment rather than the ones that were installed as dependencies, I wish there were a shorter form for this command because I think it's really useful.
|
||||
|
||||
#### Base env
|
||||
|
||||
$(base) conda env export --from-history
|
||||
name: base
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.8
|
||||
- jupyterlab
|
||||
- jupyterlab-git
|
||||
- nb_conda_kernels
|
||||
|
||||
jupyterlab is the package that runs the show, we also have jupyterlab-git which is a git plugin for it and nb_conda_kernels which allows jupyter in the base env to see the other environments on the system.
|
||||
|
||||
#### other envs
|
||||
Now I have project specific envs where I actually run python code. Here's an example one:
|
||||
|
||||
name: fk
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.8
|
||||
- scipy
|
||||
- numpy
|
||||
- matplotlib
|
||||
- munch
|
||||
prefix: /home/tch14/miniconda3/envs/fk
|
||||
|
||||
|
||||
### Remote Acess
|
||||
I often use my laptop to access a Jupyterlab server running on a beefier machine under my desk at work, the ~/.shh/config on my laptop contains
|
||||
```
|
||||
host beefyremote
|
||||
user [username]
|
||||
hostname [hostname]
|
||||
proxyJump [a machine that you need to jump through if necessary]
|
||||
IdentityFile ~/.ssh/id_rsa_password_protected
|
||||
#give access to the jupyter server on [beefyremote]:8888 to localhost:8889
|
||||
LocalForward 8889 localhost:8888
|
||||
#LocalCommand
|
||||
```
|
||||
|
||||
I open this connection and then run `jupyter lab --no-browser --port=8888` within a tmux session on the remote machine so that the server doesn't die with the connection.
|
Loading…
x
Reference in New Issue
Block a user