Yes, that’s it. I couldn’t find it quickly when I was on mobile. When I looked I couldn’t tell if it was going to be exclusive to their high end cards or not either. My guess it very well maybe. They already crippled the Titan X and 10xx cards for machine learning, so it is no surprise this would be held back from them as well.
I found it annoying to have to constantly restart my jupyter notebooks on my Ubuntu server. There are a bunch of ways to do this, but using systemd on Ubuntu you can set up an “always running” jupyter workplace (e.g. a directory with all your projects). Systemd will handle restarting for you after reboots or crashes.
Create the file: /etc/systemd/system/jupyter.service
[Unit] Description=Jupyter Workplace [Service] Type=simple PIDFile=/run/jupyter.pid ExecStart=/home/bfortuner/anaconda3/bin/jupyter-notebook --config=/home/bfortuner/.jupyter/jupyter_notebook_config.py User=bfortuner Group=bfortuner WorkingDirectory=/home/bfortuner/workplace Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
Then, run the commands
systemctl enable jupyter.service systemctl daemon-reload systemctl restart jupyter.service
With this code then after a reboot jupyter notebook will just be running on the localhost:8888? And from a remote machine I would be able to use the code you gave to forward it with ssh to my laptop?
ssh -NL 8888:localhost:8888 user@host -p portnumber -i ~/.ssh/privatekey
This is awesome. Can’t wait to set it up! Thanks @brendan.
I’ve set up an Ubuntu 16.04 box and configured it for access from my mac laptop via ssh. Everything works well, except sleeping/suspending. After I suspend my box I can use a magic packet to wake it from my phone or laptop either on or off my home lan. But if I wait more than about 15 or 20 minutes neither works.
Has anybody gotten wake on lan to work consistently from outside their home network?
Or should I just leave my rig running 24/7?
I wrote up the steps for setting up a server in Ubuntu (Windows dual boot). For the complete Ubuntu/Windows ignoramus, like I am, or was.
Perhaps someone could add it to the Wiki Installation pages?
Setup Ubuntu local server, for beginners (including Windows dual boot)
This guide is geared toward beginners with Ubuntu and Windows, to get you set up for the course with minimal hassles. I will try to clearly lay out every step needed, without assuming that you already have prior skills with these OS’s.
I do assume that you are starting with a PC and an nVidia GPU. This guide is current as of 18-March-2017. The Ubuntu version installed is 16.04.2 LTS. For other Ubuntu versions and and hardware, YMMV.
Making the Ubuntu Installer
In this section, we create the Ubuntu installer on a flash drive, from Windows. If you are not starting from Windows, you will need to create the installer a different way. You will need a USB flash drive, 2 GB or larger.
To create the bootable installer drive, follow the instructions at
You will be installing Ubuntu in its own partition, separate from the Windows partition. You may find instructions that recommend using the Windows Disk Manager to pre-allocate a partition for Ubuntu. This is neither necessary nor advised. WDM is limited in how much it can shrink the Windows partition because there are system files that cannot be moved while Windows runs. The Ubuntu installer itself can do the partitioning better than WDM because Windows is not running and can be shrunk further. Just know your ideal partition sizes before proceeding.
The Ubuntu installer advises that an internet connection will speed up the installation. Actually, a bug in the installer will cause the installation to fail partway through when there is an internet connection. So disconnect internet during the install, and don’t waste time figuring this out.
Next, boot from the installer. This will likely require entering the BIOS screens to select the USB flash drive as the boot device.
The installer will let you choose “Install them side by side, choosing between them each startup” (for dual boot), and let you size the two partitions.
Once the installer finishes, remove the flash drive and boot from the hard drive. If all has gone well, you will see a menu that allows the choice between Ubuntu and Windows.
At the top of the Launcher is a search tile that allows you to find programs quickly. Terminal is one you will be using soon. Note that Ctrl-v does not work in Terminal. You have to right-click and select Paste from the menu.
The next tile below is the file browser with your Home directory as the root. At this point, go to Edit->Preferences->Views. Select “Show hidden and backup files”. You will need to edit some of these later.
System Settings (looks like a gear and wrench) gives access to many settings for personalizing Ubuntu. Be careful with the “Additional Drivers” tab. Ubuntu will offer to install a proprietary driver from nVidia. If you install it, you will be locked out of Ubuntu in a login screen loop. Instructions for escaping this situation are in the notes below.
Shutdown and reboot are found in the gear icon in the upper right corner.
Setting up the GPU and Course Material
Note: do NOT install the nVidia drivers offered in System Settings->Additional Drivers.
Fortunately, several generous experts have created a script that does the setup automatically. The script is found at
If you are easy with git, you can get the script file directly. Or click the Raw link, and using Text Editor simply copy/paste into a local file named install-GPU.sh.
Note that the script has recently been revised to install an older version of Keras, the one that the course’s code was designed for. Later you may want to update to the current Keras 2.
One small problem is that the script calls git, which is not yet installed. To install git, open a Terminal window and enter
sudo apt install git
Now it’s time to run the script. From the Terminal window, enter
(You may simply type "bash ", and drag the script file to Terminal to enter its path.)
Wait while the script runs.
As part of its operations, the script will install an up-to-date nVidia driver, one that does not have the boot loop problem. At some point, Ubuntu required me to enable Insecure Boot Mode and provided the steps. I do not recall when this occurred.
Open Terminal, and enter
If all has gone well, you will see the GPU and its state.
Running the Notebooks
A configuration change makes this more convenient. Open the .jupyter invisible folder found in Home, and edit jupyter_notebook_config.py. Edit the matching line to
c.NotebookApp.notebook_dir = u’courses/deeplearning1/nbs/’
This way jupyter will always open to the notebooks directory.
Next, enter in Terminal
To access the jupyter server, open a browser window and go to
You should see a file list that contains the lesson notebooks for the course. Open one of them and you are ready to work.
Inside a jupyter notebook, use shift-enter to run a cell.
To monitor GPU load, enter in a second Terminal,
Run Software Updater to get security updates that were not part of the installer.
To escape from the nVidia driver boot loop, at login type Ctrl + Alt + F1. At the login prompt, type your user name all lowercase, then your password. This is called TTY login.
sudo apt-get purge nvidia-*
- To browse root level, type in Terminal
Also, feel free to edit and correct.
On to Lesson 2!
Setup problems: AWS
So I just got my 1080 Ti and did a quick run on CatsDogs. First fit time was 190s vs 245 on my old 1080.
Good idea - and thanks! We’ll add it.
You should be able to do a lot better than that, I get 229s on a 1070 and when I calculated the cuda stats and terraflops I guestimated you can hit around 140s. I’m waiting for the Gamer X editions to come out with the proper cooling and higher stock clocks.
Thanks for the information I would like to add a fresh disk for linux I guess the dual boot would work in this situation. I have done this before a long long time ago (10+ years ago pre 64 bit) with mixed results, drivers for video cards etc.
If I get to the point of having my USB install then before installing linux install the additional hard drive then run the USB install would there be any issues you can think of. Or does windows 7 need to know about the drive
I let the Ubuntu installer re-partition the existing Windows drive. So I imagine the installer would have no trouble formatting and installing onto a separate drive. Windows does not need to know anything.
The only trouble I have with Ubuntu 16.0.4 is that after Suspend, open windows come back stuck to screen garbage. The only cure is to reboot.
Can anyone recommend a hardware / computer store in San Francisco who can assemble a deep learning box? I talked to Central Computer but their Ubuntu guy has been out for months due to family emergency and they will only install Windows. Checked on Yelp but other stores seemed to be mostly focused on minor repairs, not custom boxes.
@mariya If you already have the parts and have a few hours, why try doing it yourself. The hardware part is easy… just plug and play if you follow the instructions. Getting ubuntu might be a bit tricky, but people here are very helpful.
You can just let them install windows, and then install ubuntu when you get it home.
Think @sravya8 found someone to build hers.
You shouldn’t be intimidated by it though, hardest thing was buying the parts. Now they’re just expensive legos. Just ground yourself a bit to avoid static electricity and don’t spill coffee on it and you’re fine.
While that would be ideal, I don’t have a few hours to spare. Hence the desire to outsource as much as possible.
@sravya8 - I think you went to Central Computer right? Or did you build elsewhere?
Yes, central computers it is.
Are you running Ubuntu 16.04? If so, I’d love to know the magic chant to get the 1080 TI setup running. As of now, CUDA doesn’t recognize the graphics card; I installed the 378.13 driver. X and OpenGL run OK, but CUDA no luck:
“cudaGetDeviceCount returned 30 -> unknown error”
After taking a break with mud pie and coffee, I found the magic chant: https://devtalk.nvidia.com/default/topic/938988/-solved-cuda-8-0-on-ubuntu-16-04-gpu-not-available/. I purged the drivers + cuda, then rebooted in maintenance mode, installed NVIDIA 381.13 and then CUDA 8.0 (without installing driver), then continued to boot into X.
Oh sorry I just saw this! Good to hear you figured it out.