Article Content
- Uploading from your local machine (Linux)
- Uploading from your local machine (Windows)
- Downloading from a URL
- Uploading using the Jupyter UI
To make use of your instance you might need to use data that is either on your local machine or stored on a server available over the internet. Here are a few ways how you get your data from there to the instance.
Uploading from your local Linu machine (Linux)
A whole plethora of tools allows you to transfer files from your local Linux or Mac machine to your Genesis Cloud instance using the ssh connection between them. Two prominent ones are rsync and scp.
Both of these tools require an authentication method to be set up, but they may give you a permission denied error even if the authentication worked but there was some other problem, such as a spelling error in the path. As long as you are able to use ssh to connect to your instance, you know that authentication is not the issue.
rsync
The advantage of using rsync is that it can easily sync folders between your local and remote instances. With the parameters below, it also only copies files that have been modified to the instance and does not re-transmit files that already exist.
This code is meant to be run on the local machine:
# rsync -avP <path to local file or folder> <username on the instance>@<ip of your instance>:<path that the file will have> # Example: rsync -avP ~/Documents/myproject/ [email protected]:/home/ubuntu/myproject/ |
scp
This is a link to the scp docs and here is an example that is probably similar to your use case.
This code is meant to be run on the local machine:
# scp <path to local file> <username on the instance>@<ip of your instance>:<path that the file will have> # example: scp ~/Documents/text.txt [email protected]:/home/ubuntu/Documents/ |
# examples wget -c https://www.blender.org/download/release/Blender3.3/blender-3.3.2-linux-x64.tar.xz curl -O https://www.blender.org/download/release/Blender3.3/blender-3.3.2-linux-x64.tar.xz |
Uploading using the Jupyter UI
If you are running a JupyterLab (or Notebook) on your instance, you can upload files using a button in the top left corner. (top right corner for notebooks). Here is a guide on how to get a your Jupyter environment set up.
The upload button in JupyterLab
The upload button in a Jupyter Notebook