For those who run their own AI box, or want to

Thank you so much bencoman. Let me try it in base mamba and also look at the setup script you pointed me too. Thanks for the help. I really appreciate it. Will let you know how it goes.

HI Bencoman,

I have now tried it exactly like you did in the thread you showed me. I created a fresh install with WSL on a Windows laptop.

C:> wsl --unregister Ubuntu
C:> wsl --install -d Ubuntu

Logged into

hannes@CN73TL3:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=“Ubuntu 20.04.5 LTS”

hannes@NTT-CN73TL3:~$ ping google.com
PING google.com (142.250.70.174) 56(84) bytes of data.
64 bytes from mel04s02-in-f14.1e100.net (142.250.70.174): icmp_seq=1 ttl=56 time=13.1 ms

Installed fastai:

wget -O - https://raw.githubusercontent.com/fastai/fastsetup/master/setup-conda.sh | /usr/bin/env bash

and lastly installed Jupyter and Jupyter lab:

(base) $mamba install -c conda-forge notebook
(base) $mamba install -c conda-forge nb_conda_kernels
(base) $mamba install -c conda-forge jupyter_contrib_nbextensions
(base) $mamba install -c fastchan fastai nbdev
(base) $mamba install -c conda-forge jupyterlab

(base) hannes@NTT-CN73TL3:~$ which jupyter
/home/hannes/mambaforge/bin/jupyter

This is the output that I got again.

It starts with a warning at the beginning:

/home/hannes/mambaforge/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter ‘pretrained’ is deprecated since 0.13 and may be removed in the future, please use ‘weights’ instead.
warnings.warn(
/home/hannes/mambaforge/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for ‘weights’ are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet18_Weights.IMAGENET1K_V1. You can also use weights=ResNet18_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)
Downloading: “https://download.pytorch.org/models/resnet18-f37072fd.pth” to /home/hannes/.cache/torch/hub/checkpoints/resnet18-f37072fd.pth
100%|██████████████████████████████████████████████████████████████████████████████| 44.7M/44.7M [00:05<00:00, 9.36MB/s]

0.00% [0/1 00:00<?]
epoch train_loss valid_loss error_rate time

7.14% [1/14 00:01<00:24]

TypeError Traceback (most recent call last)
Cell In [13], line 2
1 learn = vision_learner(dls, resnet18, metrics=error_rate)
----> 2 learn.fine_tune(3)

I am getting this error on this WSL2 newly installed instance as the dedicated Ubuntu 22.04.1 LTS version yesterday.

I really don’t know what I am doing wrong. Please help me.

This issue report might help you … I believe I had to modify the relevant file to fix that issue but it was a while back and so my memory is a bit hazy on things :slight_smile:

What version of Pytorch? Try 1.12.1 until fastai updates for 1.13 are rolled out.

FYI to print your fastai/pytorch version info. Try …

from fastai.test_utils import show_install
show_install()
2 Likes

@bencoman I am now running Fastai in a docker container on a Linux laptop.

I found the Dockerfile at GitHub - Paperspace/fastai-docker: Fast.AI course complete docker container for Paperspace and Gradient and it worked with GPU support.

I will go back to building it directly in Linux when I have more time to play and will be using the Docker file as reference

Thanks for your help. It was really helpful to get me started :smile:

1 Like

A few interesting vids I bumped into…

I’m not sure if these can ship international, but here is one of the shops mentioned…

I use xe.com to calculate currency exchange.
and btw, just a remidner of the obvious, right-clicking their web page gives…
image

But then, local ebay doesn’t seem too far off…

1 Like

My machine environments have become a mess after following various people’s ‘best practices’ for managing python envs and package dependencies.

I’ve tried all the solutions I can find for setting up a stable fastai env locally on Ubuntu 18.04.6 LTS and none of them have worked.

When I run: echo $PATH in my terminal this is the output:

/home/arthur/.pyenv/shims:/home/arthur/.pyenv/bin:/home/arthur/anaconda3/bin:/home/arthur/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/arthur/.local/share/JetBrains/Toolbox/scripts

Please could someone advise where I should go from here and ELI5

An outside the box suggestion on starting again

$ adduser otherme

At a minimum, you can review what the default minimal path is, to revert to in your original account. Or just continue in the new account.

2 Likes

Unsurprisingly everything works fine in a new account.

I think it’s time for a fresh OS install thank you @bencoman :pray:

1 Like