diff --git a/jupyterhub/Dockerfile b/jupyterhub/Dockerfile index ead7e15..5a37f23 100644 --- a/jupyterhub/Dockerfile +++ b/jupyterhub/Dockerfile @@ -23,9 +23,6 @@ RUN pip install --no-cache-dir \ dockerspawner \ jupyterhub-nativeauthenticator \ jupyterhub-dummyauthenticator \ - nbgrader \ - ngshare \ - ngshare-exchange \ psycopg2-binary RUN mkdir -p /srv/nbgrader \ diff --git a/jupyterhub/compose.yml b/jupyterhub/compose.yml index 015d6c6..0427655 100644 --- a/jupyterhub/compose.yml +++ b/jupyterhub/compose.yml @@ -11,9 +11,6 @@ services: - /var/run/docker.sock:/var/run/docker.sock - ./templates:/srv/jupyterhub/templates:ro - ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py - - ./nbgrader_config.py:/srv/jupyterhub/nbgrader/nbgrader_config.py:ro - - ../nbgrader/exchange:/srv/nbgrader/exchange - - ../nbgrader/courses:/srv/nbgrader/courses # Just the Hacky way to pull images at startup # It just pulls the image but they wont startup diff --git a/jupyterhub/jupyterhub_config.py b/jupyterhub/jupyterhub_config.py index c14bfc6..323002a 100644 --- a/jupyterhub/jupyterhub_config.py +++ b/jupyterhub/jupyterhub_config.py @@ -156,38 +156,3 @@ c.JupyterHub.concurrent_spawn_limit = 10 # Allow named servers c.JupyterHub.allow_named_servers = True c.JupyterHub.named_server_limit_per_user = 3 - -# ngshare service configuration -c.JupyterHub.services.append( - { - "name": "ngshare", - "url": "http://127.0.0.1:10101", - "command": [ - "python3", - "-m", - "ngshare", - "--admins", - "admin", - "--debug" if ds_debug else "", - ], - "environment": { - "JUPYTERHUB_SERVICE_URL": "http://127.0.0.1:10101", - "JUPYTERHUB_SERVICE_REDIRECT_URL": f"{base_url}services/ngshare/", - "JUPYTERHUB_BASE_URL": base_url, - }, - } -) - -# Additional ngshare configuration -c.JupyterHub.load_roles = [ - { - "name": "ngshare", - "scopes": [ - "admin:servers", - "access:services", - "list:users", - "read:users:activity", - ], - "services": ["ngshare"], - } -] diff --git a/jupyterhub/nbgrader/nbgrader_config.py b/jupyterhub/nbgrader/nbgrader_config.py deleted file mode 100644 index 0e8e798..0000000 --- a/jupyterhub/nbgrader/nbgrader_config.py +++ /dev/null @@ -1,30 +0,0 @@ -# /srv/nbgrader/nbgrader_config.py -c = get_config() - -# 1. Course Configuration -c.CourseDirectory.course_id = "intro-to-python" # Change to your course name -c.CourseDirectory.root = '/srv/nbgrader/courses' - -# 2. Exchange Directory (for submitting/collecting assignments) -c.Exchange.root = '/srv/nbgrader/exchange' -c.Exchange.path_includes_course = True - -# 3. JupyterHub Integration -#c.NbGrader.hub_url = 'http://jupyterhub:8081/hub/api' -#c.NbGrader.hubapi_token = 'your-hub-token' # Generate with: openssl rand -hex 32 - -# 4. Database Configuration -c.StudentAssignmentNotebook.database_url = 'sqlite:////srv/nbgrader/nbgrader.sqlite' - -# 5. Assignment Policies -c.ExecutePreprocessor.timeout = 300 # 5 minutes timeout per cell -c.ClearSolutions.code_stub = "# YOUR CODE HERE" -c.ClearSolutions.text_stub = "YOUR ANSWER HERE" - -# 6. Formgrader UI Settings -c.FormgradeApp.port = 9999 -c.FormgradeApp.authenticator_class = 'nbgrader.auth.hubauth.HubAuth' -c.FormgradeApp.ip = '0.0.0.0' - -# 7. Permissions -c.CourseDirectory.groupshared = True diff --git a/jupyterhub/nbgrader_config.py b/jupyterhub/nbgrader_config.py deleted file mode 100644 index 9ba770b..0000000 --- a/jupyterhub/nbgrader_config.py +++ /dev/null @@ -1,44 +0,0 @@ -import os - -c = get_config() - -# Database configuration - use the same PostgreSQL as JupyterHub -p_user = os.environ.get("POSTGRES_USER", "") -p_pass = os.environ.get("POSTGRES_PASSWORD", "") -p_host = os.environ.get("POSTGRES_HOST", "postgres") -p_db = os.environ.get("POSTGRES_DB", "jupyterhub") - -# NBgrader database URL -c.CourseDirectory.db_url = f"postgresql://{p_user}:{p_pass}@{p_host}:5432/{p_db}" - -# Course configuration -course_id = os.environ.get("NBGRADER_COURSE_ID", "default_course") -c.CourseDirectory.course_id = course_id -c.CourseDirectory.root = "/srv/nbgrader" - -# Exchange directory configuration -exchange_dir = os.environ.get("NBGRADER_EXCHANGE_DIRECTORY", "/srv/nbgrader/exchange") -c.Exchange.root = exchange_dir -c.CourseDirectory.course_id = course_id - -# Authentication -c.FormgradeApp.authenticator_plugin_class = "nbgrader.auth.JupyterHubAuthPlugin" - -# Logging -c.Application.log_level = "INFO" - -# Formgrader settings -c.FormgradeApp.ip = "0.0.0.0" -c.FormgradeApp.port = 9999 -c.FormgradeApp.base_url = "/jupyter/services/nbgrader-formgrader/" - -# Enable tornado debug mode for development -c.FormgradeApp.tornado_settings = {"debug": True} - -# Assignment settings -c.AssignmentListApp.assignment_dir = "/home/jovyan/assignments" -c.AssignmentListApp.exchange_directory = exchange_dir - -# Grader settings -c.AutogradeApp.force = True -c.GenerateAssignmentApp.force = True diff --git a/jupyterhub/templates/logo.png b/jupyterhub/templates/logo.png index 5d90a03..670b7cb 100644 Binary files a/jupyterhub/templates/logo.png and b/jupyterhub/templates/logo.png differ