Make sure that you are using the SSH/Terminal from NimbleBox to run the following commands.
Generate the API token from
- My Account
- Click “Create New API Token”.
- A Kaggle.json will be downloaded with the username and token key.
- Upload Kaggle.json to NimbleBox
Note: Make sure you click on ‘Expire API token’ before creating new API token.
Step 1 : Create a directory named Kaggle.
mkdir - make directory
Troubleshooting: ‘You might encounter kaggle command not found error when running commands on jupyter notebook or kaggle is not installed in the first place’
Step 2 : Make sure Kaggle.json file is present inside the Kaggle directory
cp <source-file> <destination-file> eg: cp /mnt/disks/user/project/kaggle.json ~/.kaggle
cp command helps to copy from the source file to destination file
Double check: Make sure the path mentioned is correct inside NimbleBox
Step 3 : Provide the required access permission using the following command
chmod 600 ~/.kaggle/kaggle.json
Step 4 : Connect to our proxy
kaggle config set -n proxy -v $HTTPS_PROXY
Step 5: Use download command from Kaggle to upload the required dataset.
kaggle datasets download -d <dataset-location>
example: kaggle datasets download -d alxmamaev/flowers-recognition
Trouble shooting: ‘401 unauthorised’ : Issue occurs when kaggle.json isn’t the latest (API token has expired). Generate a new kaggle.json file and upload to NimbleBox
Kaggle downloads the folder in the zip format.
sudo apt update
Download zip and unzip command
sudo apt install p7zip-full unzip zip
Use this command to unzip
7za x <filename>.zip
Example: 7za x flowers-recognition.zip
Replace with the name of the file that is required to be unzipped