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
FreemanOP3y ago
Template ^
Freeman
FreemanOP3y ago
^ Workspace
No description
Freeman
FreemanOP3y ago
No jupyter option here
Atif
Atif3y ago
can you share your template file? main.tf
Freeman
FreemanOP3y ago
@Atif
Phorcys
Phorcys3y ago
I reposted your file with an extension so it's possible to read it within discord
Freeman
FreemanOP3y ago
Ahh ok thanks!
Phorcys
Phorcys3y ago
hmm are you visiting from a user that isn't the owner ?
Freeman
FreemanOP3y ago
Nop
Phorcys
Phorcys3y ago
oh I think I see hold on yup you're running 2 agents I'll correct your template and explain
Freeman
FreemanOP3y ago
Ok
Phorcys
Phorcys3y ago
this should work
Phorcys
Phorcys3y 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
FreemanOP3y ago
So normally in a given main.tf there can only be 1 coder_agent ??
Phorcys
Phorcys3y ago
yes, if there is only one container/machine
Freeman
FreemanOP3y ago
Got it will try running this once
Phorcys
Phorcys3y 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
FreemanOP3y 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
Phorcys3y ago
you could check how I do it in my template
Freeman
FreemanOP3y ago
Does jupyter not work without subdomain being setup?
Freeman
FreemanOP3y ago
No description
Freeman
FreemanOP3y ago
Thanks! will check this out
Phorcys
Phorcys3y 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
FreemanOP3y ago
Oooh
Phorcys
Phorcys3y 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
FreemanOP3y ago
Yeah checked it out earlier does not fit my use case
Phorcys
Phorcys3y ago
oh okay
Freeman
FreemanOP3y ago
My main next steps would be to add a Dockerfile in this to include some of my required binaries
Phorcys
Phorcys3y ago
👍
Freeman
FreemanOP3y ago
Thanks for all the help man! Just one more thing 😛
Freeman
FreemanOP3y ago
Any idea on this ?
No description
Phorcys
Phorcys3y ago
yup your healtcheck declaration is not good for jupyterlab it's requesting to /healthz which probably doesn't exist in jupyterlab
Freeman
FreemanOP3y ago
Hmmm
Phorcys
Phorcys3y ago
so I would just get rid of that
Freeman
FreemanOP3y ago
It would need to have some sort of healthcheck right ?
Phorcys
Phorcys3y 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
FreemanOP3y ago
Yup did not work 😂 Got a bad gateway
Phorcys
Phorcys3y ago
marking as resolved
Codercord
Codercord3y ago
Marked the thread as resolved.

Did you find this page helpful?