This repository has examples showing you how to use FastAI Scaleway GPU Instances.
Scaleway's "RENDER-S" GPU Instances are billed at €1.00 per hour. They come with the following specifications:
- Dedicated NVIDIA Tesla P100 16GB PCIe
- 10 Intel Xeon Gold 6148 cores (2.4 GHz)
- 45 GB RAM
- 400 GB SSD storage
- 1 Gbit/s of bandwidth
Create your account on console.scaleway.com. You require a valid email address to confirm your account.
Scaleway's services are postpaid. This means you receive a monthly invoice for your resource consumption. To be able to deploy resources, you have to register a valid credit or debit card in your account.
Note: When you register your card, a €2.00 transaction is made. This transaction comes with a validation code. It is required to validate the card in your Scaleway Console - once validated, the amount will be refunded to your card.
You require an SSH key to access your GPU instance. An SSH key allows passwordless authentication on Secure SHell connections. On computers running Linux or MacOS, you can create the SSH key from a terminal: Type the following command ssh-keygen -o -b 4096 and press Enter to generate the new key.
On computers running Windows, or if you prefer a graphical user interface, you can use a tool such as PuTTYgen to generate the key.
1 . Download PuTTYgen to your local computer
2 . Launch PuTTYgen by double-clicking on the application:
3 . Select RSA, set the number of bits in the key to 4096, and click the Generate button:
4 . Move the mouse around the blank area, as indicated, to generate some randomness:
5 . Two keys are generated (a public key that will be transferred to your instances and a private key that you must keep secret):
- Fill-in the Key-comment field with a name to help you identify this key pair.
- Click the Save public key button and save it in the folder of your choice.
- Click the Save private key button and save it the same folder.
- Select the public key content. Copy it (below Public key for pasting into OpenSSH authorized_keys file) into your clipboard, which is required for the following step.
6 . Go to your Scaleway Elements console and add the key to your Project.
Upload the public key's content by clicking on Add a new SSH key on the Credentials tab of the Project Dashboard.
A pop-up appears. Paste the key in the indicated box, add a description, and click on Add a SSH key.
By default, your quota for "RENDER-S" instances is set to 0, and you will need to request a quota increase in order to create a GPU Instance. To increase your quota, contact Scaleway's Trust&Safety Team by ticket.
1 . In the Compute section of the side menu in the Scaleway Elements console, click Instances. If you do not have an instance already created, the product presentation displays.
2 . Click Create an instance.
3 . Choose the Region for your GPU Instance.
4 . Choose an Image for your instance: Click on the GPU OS tab and select Ubuntu Bionic ML 10.2
5 . Select an instance type: Click on the GPU tab and select RENDER-S
6 . Optionally, enter a custom name for your instance.
7 . Click Create to deploy your GPU Instance
1 . Once your GPU instance is ready, connect to it using SSH to launch the Jupyter Notebook application:
ssh root@gpu-instance-ip
2 . Start the Jupyter Notebook application by running the following command:
jupyter notebook --no-browser --port=8888 --allow-root
The flag --no-browser prevents the notebook from attempting to open in a browser after startup. The flag --port=8888 specifies the port on which the notebook listens. It is possible to change this value to another port number if required.
If you start the application for the first time, a link with an authentication token displays. Keep a note of this token as you need it in a later step:
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=da97d8dfc8e409f2045da6ccb8685407644a409c2d51bc6e
3 . Open a local terminal and run the following command:
ssh -N -L localhost:7777:localhost:8888 root@gpu-instance-ip
The command above configures the port forwarding of the local port 7777 to port 8888 on the GPU instance. This allows access to the Jupyter Notebook with a web browser from the local computer.
Optional: Use the option
-fin the command above to move SSH into the background, so the local terminal remains usable.
10 . Open a web browser and go to http://localhost:7777. Enter the authentication token and click login. The Jupyter Dashboard displays.
You can get your course material by cloning the GitHub repository. To do so, open a new terminal in Jupyter Notebook by clicking on New -> Terminal:
Type the following command in the terminal to get the 2020 version of the course 'git clone https://github.com/fastai/course20'
Note: Alternatively, you can also run the command in a "classic" SSH terminal.
To manage your expenses, you can archive your GPU instance when you are not using it. When the GPU instance is archived, only storage and your flexible IP address are billed. You can do this either from the Scaleway control panel by clicking the power button or by using the Scaleway Command Line Interface:
scw instance server stop <instance_id>
When you have finished the course; you can delete the GPU instance either from the Scaleway Elements Console or by using the CLI:
scw instance server delete <instance_id>







