How to do an Ubuntu local setup for part1 v2?

Regarding the first one,
The best solution is to make a copy of that notebook which your are working on and rename it beginning with tmp

Now your edits will remain else gitpull will cause issues…

Hi,

I just set up one for me on Ubuntu 17.10. tool the file from http://files.fast.ai/setup/paperspace and followed most of the commands. The change required was for the nvidia repo locations.
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/cuda-repo-ubuntu1704_9.1.85-1_amd64.deb
It’s a GTX 1050 machine. When I installed ubuntu it installed CUDA 8, which I had to uninstall following the links from @beacrett and downloaded the latest cuDNN from nvidia site.
After the environment update I installed tensorflow-gpu and keras from conda and tested the following

import torch
torch.cuda.get_device_name(0)
print(torch.rand(3,3).cuda())

import tensorflow as tf
with tf.device(’/gpu:0’):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name=‘a’)
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name=‘b’)
c = tf.matmul(a, b)

Creates a session with log_device_placement set to True.

sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=False, log_device_placement=False))
sess.run(tf.global_variables_initializer())

Runs the op.

print(sess.run©)

The log shows execution in GPU. I am new in ML though, so not sure if I need to check anything else. Will report if anything breaks while executing. Thought of sharing, if it helps.

Thanks guys for posting all the required details here.

@nikola Did you ever get this to work with Mint? Just curious before I give it a try.

Hi Mat, nope I’m using paper space until I get my DL box ready then I will switch to Ubuntu like everyone else.
Let me know how it goes, I’m still using Mint on my laptop.

Hey! I’ve recently started the fastai course online and have setup fastai using the paperspace script on my ubuntu 14.04 and its working. But now I see the (fastai) always on my command line. How do I get rid of it?

FuTk0

i see it also, does not seem to be a problem, lesson 1 runs fine
is this a problem for you ?

No, not a problem. But I do not need it always. Anyways, I’ve found the problem. Anaconda modified the bashrc file and activated the conda environment. I just commented that out. Now I activate the environment whenever I need to.

Hi, I made some minor adaptations to the paperspace script for my needs and put it here: https://github.com/jonas-pettersson/setup/tree/master/fastai_2018. I use it for setting up an AWS instance, but the script can be used also for setting up your local Linux machine. The reason I needed this is that the fastai deep learning AMI is not available in the Frankfurt region (and I had to use this region).

** Update – All is good now. I removed the nvidia driver, reinstalled using the paperspace script then disabled secure boot.


Hi, I follow the steps in http://files.fast.ai/setup/paperspace to set up my own Ubuntu.

At the step “sudo apt install cuda -y”, I had the following error:

The following packages have unmet dependencies:
_ cuda : Depends: cuda-9-2 (>= 9.2.88) but it is not going to be installed_
E: Unable to correct problems, you have held broken packages.

Before running the script, I installed nvidia driver version 390.67.

Can someone please give me a hint on the source of the error above? Thank you.
-Troy

Problem with a login loop after running the paperspace script:

Hi, I ran the script after a completely fresh install of Ubuntu 16.04 on a machine with 2 1080ti’s. I installed git first, then ran the paperspace script. The first line,

sudo rm /etc/apt/apt.conf.d/*.*

failed, as it failed to find the file in question. I removed this from the script and reran. It worked for the most part, but did not make it to the end of the script - there were exceptions thrown around this point:

echo 'export PATH=~/anaconda3/bin:$PATH' >> ~/.bashrc
export PATH=~/anaconda3/bin:$PATH
source ~/.bashrc
conda env update
echo 'source activate fastai' >> ~/.bashrc
source activate fastai
source ~/.bashrc

After this failed, I manually ran conda env update and it said “Command not found.”.

A bigger issue though, is that when I rebooted the machine, I got into a login loop. I would enter my password and it would send me straight back to the login page again. I’ve encountered this issue before when updating nvidia drivers, with solutions ranging from disabling secure boot to change xorg settings and Nouveau.

Am wondering if I should fresh install and try run the following script tomorrow:

install-gpu.sh from https://github.com/fastai/courses/blob/master/setup/install-gpu.sh

Cheers,

I ran the following script: install-gpu.sh from https://github.com/fastai/courses/blob/master/setup/install-gpu.sh

But ran into the same issue again with a login loop! I went into TTY using ctrl + alt + f1, and ran

sudo apt-get purge nvidia*
sudo service lightdm restart

This got rid of the drivers, and allowed me to get back through the main login page but clearly doesn’t fix the issue. Any suggestions? I’m thinking of plugging my monitor into one of the 1080’s directly and bypassing the motherboard altogether but this seems hacky - I’m sure there is a better solution.

@gregor114

Looks like you missed to run the command “nvidia-xconfig” that is it. Nothing else is required I guess.

Here is my experiance I’ve shared. Try to keep it 5 simple steps.

One of the pain with Ubuntu as in 18.04(I am using virtual box hosted in Win 10 with GPU 1050Ti) is about the gpu driver. I tried 19.04, it seems working better. Ubuntu 20 should be released soon in this month. I think you can try. So for the 19.04 seems working fine for me.