mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 07:14:21 +00:00
Stefano Pigozzi
d06959dc06
* ✨ Start notebooks app * 🔧 Fix nullable fields for notebooks * 🔧 Display user-friendly name for `Notebook`s * 🔧 Allow filtering in the notebook admin page * 🗒 Improve README * 🗒 Improve README again * ⬆ Add bluelib to the dependencies of the frontend * 🧹 Prepare a good frontend base for development * ✨ Port and improve useStorageState Original: https://github.com/pds-nest/nest/blob/main/nest_frontend/hooks/useLocalStorageState.js * 🧹 Remove React logo * ⬆ Add `docker` to the dependencies * ⬆ Add `axios` to the dependencies * 🔨 Mark `src` as sources root * ✨ Add API routes to view Notebooks * 🔧 Use a router for the `by-project` route * 🐛 Fix deletion failing on `SophonViewSet` * 🔧 Abstract notebook methods * ✨ Create a base docker client * 🚧 Proof of concept for notebook starter * 📔 Document the contents of the Django apps * 🚧 Incomplete container implementation * 🚧 Working container implementation * 💥 Leftovers from an experiment * ✨ Correct implementation of the proxy configuration (Apache config file is still missing) * 💥 Improve code * 💥 Improve more things * 🔧 Remove duplicated `/project` in project app urls * ✨ Add basic Apache proxy config file * 🔧 User should have sudo access on the notebook * ✨ Implement the Internet access field (currently ignored) * 🧹 Cleanup code
50 lines
2.4 KiB
Python
50 lines
2.4 KiB
Python
# Generated by Django 3.2 on 2021-09-05 03:48
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
|
|
import sophon.notebooks.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('notebooks', '0002_auto_20210901_1527'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RemoveField(
|
|
model_name='notebook',
|
|
name='volume_id',
|
|
),
|
|
migrations.AddField(
|
|
model_name='notebook',
|
|
name='jupyter_token',
|
|
field=models.CharField(blank=True, default=sophon.notebooks.models.generate_secure_token,
|
|
help_text='The token to allow access to the JupyterLab editor.', max_length=64, verbose_name='Jupyter Access Token'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='notebook',
|
|
name='container_id',
|
|
field=models.CharField(blank=True,
|
|
help_text='The id of the Docker container running this notebook. If null, the notebook does not have an associated container.',
|
|
max_length=256, null=True, verbose_name='Docker container ID'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='notebook',
|
|
name='container_image',
|
|
field=models.CharField(
|
|
choices=[('jupyter/base-notebook', 'Base'), ('jupyter/minimal-notebook', 'Python'), ('jupyter/scipy-notebook', 'Python (Scientific)'),
|
|
('jupyter/tensorflow-notebook', 'Python (Tensorflow)'), ('jupyter/r-notebook', 'Python + R'),
|
|
('jupyter/pyspark-notebook', 'Python (Scientific) + Apache Spark'),
|
|
('jupyter/all-spark-notebook', 'Python (Scientific) + Scala + R + Apache Spark')],
|
|
help_text='The Docker image to run for this notebook.', max_length=256, verbose_name='Docker image'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='notebook',
|
|
name='port',
|
|
field=models.IntegerField(blank=True,
|
|
help_text='The port number of the local machine at which the container is available. Can be null if the notebook is not running.',
|
|
null=True, validators=[django.core.validators.MinValueValidator(49152), django.core.validators.MaxValueValidator(65535)],
|
|
verbose_name='Local port number'),
|
|
),
|
|
]
|