cs50 / codespace

https://cs50.readthedocs.io/cs50/codespace
GNU General Public License v3.0
120 stars 352 forks source link

Simplify the process of installing data-science related toolkits #73

Open rongxin-liu opened 1 year ago

dmalan commented 1 year ago

What might be best? A .cs50.yml file or .cs50.json or such, inside of which could be packages to install when the container starts/restarts, a la cmd for https://cs50.readthedocs.io/sandbox/#api? Or support for execution of an arbitrary .sh file in a specified location?

rongxin-liu commented 1 year ago

For this particular issue, I'm thinking of adding a button in our menu allowing one-click install Jupyter notebook extension and scikit-learn python package. This should be enough for students to start with their projects that rely on jupyter notebook. Jupyter is bundled with VS Code when Codespace starts and we decided to force uninstall jupyter a while back, causing some headache for students, so I think we'd want to provide an easy way for them to re-install jupyter.

rongxin-liu commented 1 year ago

Relatedly, to allow users further customize their codespaces (install Ubuntu/Python packages, run scripts, etc.,) I'd suggest we do that via postCreateCommand, in which we look for a user-defined script to execute at a specific location. That should give users more flexibility.

dmalan commented 1 year ago

Know of any conventions we could/should adopt? E.g., other tools or Linux distros that look for a specifically named file and executes it on start? At the root level, there are files like rc.local on some distros, but not sure about user accounts.