Basic Jupyter setup with code server

Hi everyone just installed coder and trying to set up a template with vscode-server and Jupyter I followed the docs and added the entries in my main,tf file and in templates page the app shows. However when a workspace is deployed there is no option for Jupyter any ideas on this ?
No description
42 Replies
Freeman
FreemanOP2y ago
Template ^
Freeman
FreemanOP2y ago
^ Workspace
No description
Freeman
FreemanOP2y ago
No jupyter option here
Atif
Atif2y ago
can you share your template file? main.tf
Freeman
FreemanOP2y ago
@Atif
Phorcys
Phorcys2y ago
I reposted your file with an extension so it's possible to read it within discord
Freeman
FreemanOP2y ago
Ahh ok thanks!
Phorcys
Phorcys2y ago
hmm are you visiting from a user that isn't the owner ?
Freeman
FreemanOP2y ago
Nop
Phorcys
Phorcys2y ago
oh I think I see hold on yup you're running 2 agents I'll correct your template and explain
Freeman
FreemanOP2y ago
Ok
Phorcys
Phorcys2y ago
this should work
Phorcys
Phorcys2y ago
basically, you were using a separate coder_agent named coder just for jupyterlab which is kind of an issue since you were not running that agent in the docker container's entrypoint. I'm not even sure you could run two coder agents on the same machine
Freeman
FreemanOP2y ago
So normally in a given main.tf there can only be 1 coder_agent ??
Phorcys
Phorcys2y ago
yes, if there is only one container/machine
Freeman
FreemanOP2y ago
Got it will try running this once
Phorcys
Phorcys2y ago
see that & I added to code-server, it means that it will fork the process, it will run it in the background. I also see you're running pip3 install jupyterlab in the startup script, I would recommend making your own Dockerfile that does this to avoid overhead, because that will install jupyterlab on EVERY agent boot.
Freeman
FreemanOP2y ago
Got this example from the docs which is why I used it Do you have any resources which I can read on how can I integrate my own Dockerfile in this Your file worked But stuck another place now
Phorcys
Phorcys2y ago
you could check how I do it in my template
Freeman
FreemanOP2y ago
Does jupyter not work without subdomain being setup?
Freeman
FreemanOP2y ago
No description
Freeman
FreemanOP2y ago
Thanks! will check this out
Phorcys
Phorcys2y ago
it should, but the coder_app for jupyter in your template has subdomain = true, so coder wants to assign that app to a subdomain
Freeman
FreemanOP2y ago
Oooh
Phorcys
Phorcys2y ago
you could also check @Atif's deeplearning template that has Jupyter Notebook/Server -> https://github.com/matifali/coder-templates/blob/main/deeplearning maybe it will suit you, idk
Freeman
FreemanOP2y ago
Yeah checked it out earlier does not fit my use case
Phorcys
Phorcys2y ago
oh okay
Freeman
FreemanOP2y ago
My main next steps would be to add a Dockerfile in this to include some of my required binaries
Phorcys
Phorcys2y ago
👍
Freeman
FreemanOP2y ago
Thanks for all the help man! Just one more thing 😛
Freeman
FreemanOP2y ago
Any idea on this ?
No description
Phorcys
Phorcys2y ago
yup your healtcheck declaration is not good for jupyterlab it's requesting to /healthz which probably doesn't exist in jupyterlab
Freeman
FreemanOP2y ago
Hmmm
Phorcys
Phorcys2y ago
so I would just get rid of that
Freeman
FreemanOP2y ago
It would need to have some sort of healthcheck right ?
Phorcys
Phorcys2y ago
you can request / then, but I don't use healthchecks as of now in my templates because you're going to realise pretty quickly if it's unhealthy lol
Freeman
FreemanOP2y ago
Yup did not work 😂 Got a bad gateway
Phorcys
Phorcys2y ago
marking as resolved
Codercord
Codercord2y ago
Marked the thread as resolved.
Want results from more Discord servers?
Add your server