Jeremy's Harebrained install guide

Alternatively, you can set up your swift kernal so that it is accessible regardless of where you open jupyter notebooks. Doing it this way means that you can easily switch between kernals while working (i.e. have one notebook using one kernal and another notebook using a different one).

From your base environment (before you activate your swift env), use:

python -m ipykernel install --user --name swift --display-name "swift"

  • the syntax --user automatically references the user that you are logged in as, on your ubuntu machine

  • the text that follows --name (i.e. swift) is the name of the conda virtual environment that you created

  • the text that follows --display-name is the name you want to show up in the list of kernels available to your jupyter notebooks

4 Likes

I think it is because I never installed apt-fast and maybe this then didn’t done that. Thanks! I will test it soon.

Thanks Deena, I didn’t know you could do that!

A productive day! Upgraded an Azure Deep Learning NC6 VM to 18.04 Ubuntu and configured S4TF as per Jeremy’s minimal steps above! Let me know if you need any pointers.

There should be a ‘cd’ before these lines I think, but you then you repeat this in the s4tf setup, which fixes it anyway.

No it’s fine - that’s not a relative path so doesn’t matter where you are.

1 Like

Got it - I’m nearly as good with Linux as Chris was with Windows :wink:

If you want to go full universe brain on cross platform, then I highly recommend a mac keyboard plugged into a windows machine using jupyter hosted on a linux box. It worked for the talk :slight_smile:

7 Likes

We really should have followed up on your idea to vnc in to your Mac to show off Xcode too… :wink:

1 Like

haha, if only the amiga port of swift were done!

1 Like

Any word on the ARM64 versions of SWTF? I haven’t gotten an answer on the NVIDIA Jetson Nano.

what is ARM64?

64 bit ARM processor found in most phones, single board computers and of course The NVIDIA Jetson Nano $99 board that runs pytorch and fastai.

1 Like

I tried everything from start after downloading apt-fast and here is one part I notice.


It says cuda 9.0 probably because that is what I downloaded a year ago when I bought this computer. Should I remove it somehow or do I need to even care about this?

nvidia-smi

1 Like

Have you tried building it? Agree this would be cool. LLVM support that as a target (right?) so I would imagine Swift could run. We already know tensorflow runs. So it should be fine…?

I am having a hard time trying to reach nvidia from Ubuntu-virtualbox, it is my first time dealing with virtual machines and Ubuntu. I have run the lines in the script provided up until :

sudo modprobe nvidia

modprobe: ERROR: could not insert ‘nvidia’: No such device

I have a Geforce GTX 850M.
I googled for solutions but non of them solved it, any suggestions please?

I followed Jeremys guide starting from the “setup s4tf” part as I am already running fastai/pytorch on Ubuntu 18.04.2 LTS with system-level CUDA and cudnn but when I try to run the first cell in the “00_load_data.ipynb” notebook I get the following error in the shell:

  File "/home/username/Documents/swift-jupyter/swift_kernel.py", line 19, in <module>
    import lldb
  File "/home/username/swift/usr/lib/python3.7/site-packages/lldb/__init__.py", line 39, in <module>
    import _lldb
ModuleNotFoundError: No module named '_lldb'

Also my notebooks do not have the color formatting seen above in the thread (and a additional cell at the top):

They only thing I changed at the install script from Jeremy in the first post is the location of the git folder, but that should not break the setup, or am I wrong?

I checked all the (sym)links that are in the error message and they all seem to point to files and don’t go nowhere.

After running

python register.py --sys-prefix --swift-python-use-conda --use-conda-shared-libs   --swift-toolchain ~/swift

I get Registered kernel 'Swift' as 'swift'! but when I look up the conda environment with conda env list it does not show up in the list but the Swift kernel is available in Jupyter.

Maybe somebody has a tip on how to solve this issue?

1 Like

Continuing the discussion from Jeremy's Harebrained install guide:

Hey jeremy, i just took the liberty and changed that ssh URL for fastai_docs to https method. Hope you won’t mind. :slight_smile:

1 Like

I also got the same problem with lldb package.

1 Like