sandbox-docs-public/src/sandbox/services.md

75 lines
3.5 KiB
Markdown

# Services
![sandbox](https://uptime.monitoring.iuk.hdm-stuttgart.de/api/badge/1/status)
# Playground
Within the sandbox, the different disciplines inside the IKID project can provide tasks to be worked on by the respective student groups. Both text-based tasks and programmatic tasks can be provided and processed. For example, Markdown files can be created for editing textual tasks. These files can be converted from the source form (unformatted) to the target form (formatted) using a simple syntax.
Currently, it is planned for the technical lectures that the students get first in touch with the programming language Python. Therefore, the Sandbox platform was created, in which experiments with Python can be carried out. But if needed, it is possible to add more supported languages in the future.
[Sandbox](https://sandbox.iuk.hdm-stuttgart.de/)
(only accessible from the HdM-Network)
1. **Sign in**, use your **HdM Credentials**
2. Select the image you want to start (two options)
1. **Datascience environment**
2. **GPU environment** (choose only if you realy need the graphic card, otherwise you steal resources from those who need them)
3. Create or upload a .ipynb file to start with
1. . **create a empty .ipynb file:**
![sandbox launcher](res/sandbox_launcher.png "Sandbox Launcher")
2. **upload a existing .ipynb file:**
![sandbox upload file](res/sandbox_upload_file_selector.png "Sandbox upload file")
4. **open** the file from the filebrowser & start working!
![sandbox .ipynb file](res/sandbox_ipynb_example.png "Sandbox Notebook").
5. **After you finished your work dont forget to shutdown your server!** Therfore you should shutdown your server to release server resources. **Select File, Hub Control Panel**
![file menue](res/sandbox_file_menu.png "File menue")
7. Select **Stop Server**
![stop server](res/sandbox_stop_server.png "Stop Server")
1. Select the arrow in the upper right corner to **Logout**
![logout](res/sandbox_logout.png)
# Training
Coming Soon ...
# Storage
In the following section we describe how to store data on the Sandbox. There are three diffrent ways to do so: Inside the Sandbox, Object Storage, Git LFS.
## Inside the Sandbox
To store the data inside the Sandbox, you just have to drag & drop or click on the upload button to save the file to your running instance. You can also create folders and new Notebooks. The only limitation is, that each user has 1GB of storage.
![file upload](res/sandbox_upload_file_selector.png "File Upload")
## Object storage
To use the Object storage, you can upload a file via REST-Interface and access it by the key you get provided in the response. If you want to upload your file:
**Upload Example**
```python
import requests
url = "https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload"
filename = "ds_salaries.csv"
files = {'fileUpload': (filename, open(filename, 'rb'),'text/csv')}
r = requests.post(url, files=files)
```
**Usage Example**
```python
import pandas as pd
url = "https://storage.sandbox.iuk.hdm-stuttgart.de/upload/ec6c1c9c-ea9b-47ff-97cf-f92d870e8fb9/ds_salaries.csv"
df = pd.read_csv(url)
```
## Git LFS
The following solution we highly recomment only for users which are familiar with git command line tools! Git Large File Storage (LFS). An open source Git extension for versioning large files. Git LFS replaces large files (audio, sample, datasets, videos) by a text pointer inside git. The files get stored on our gitea Server.
For further information visit [Git LFS](https://git-lfs.com/).
## Tmp Binary
headless binary curl