Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/project/init-kucalc.ts
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { init as initJupyterPool } from "@cocalc/jupyter/pool/pool";6import { init as initJupyterPoolParams } from "@cocalc/jupyter/pool/pool-params";7import { activate as initAutorenice } from "./autorenice";8import * as dedicatedDisks from "./dedicated-disks";9import { getOptions } from "./init-program";10import * as initScript from "./init-script";11import * as kucalc from "./kucalc";12import { getLogger } from "./logger";13import * as projectSetup from "./project-setup";14import * as sshd from "./sshd";1516export default async function init() {17const winston = getLogger("init kucalc");18const options = getOptions();19winston.info("initializing state related to KuCalc");20if (options.kucalc) {21winston.info("running in kucalc");22kucalc.setInKucalc(true);23} else {24winston.info("NOT running in kucalc");25kucalc.setInKucalc(false);26}2728if (process.env.COCALC_PROJECT_AUTORENICE != null || options.kucalc) {29initAutorenice();30}3132projectSetup.configure();33const envVars = projectSetup.set_extra_env();3435if (options.sshd) {36sshd.init(envVars);37}3839// this must come after projectSetup.set_extra_env !40initJupyterPoolParams();4142await dedicatedDisks.init();4344initScript.run();4546// this has to come after setting env vars and intializing the pool params47initJupyterPool();48}495051