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 ?
42 Replies
Template ^
^ Workspace
No jupyter option here
can you share your template file?
main.tf
I reposted your file with an extension so it's possible to read it within discord
Ahh ok thanks!
hmm
are you visiting from a user that isn't the owner ?
Nop
oh
I think I see
hold on
yup
you're running 2 agents
I'll correct your template and explain
Ok
this should work
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 machineSo normally in a given main.tf there can only be 1 coder_agent ??
yes, if there is only one container/machine
Got it
will try running this once
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.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
you could check how I do it in my template
Does jupyter not work without subdomain being setup?
L196 -> Image declaration : https://github.com/uwu/basic-env/blob/71c08b1742b972641dcceed9fab811b76f3d17f1/main.tf#L196
L230 -> Set the docker container to use the image : https://github.com/uwu/basic-env/blob/71c08b1742b972641dcceed9fab811b76f3d17f1/main.tf#L230
Thanks! will check this out
it should, but the
coder_app
for jupyter in your template has subdomain = true
, so coder wants to assign that app to a subdomainOooh
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
Yeah checked it out earlier does not fit my use case
oh okay
My main next steps would be to add a Dockerfile in this to include some of my required binaries
👍
Thanks for all the help man!
Just one more thing 😛
Any idea on this ?
yup
your
healtcheck
declaration is not good for jupyterlab
it's requesting to /healthz
which probably doesn't exist in jupyterlabHmmm
so I would just get rid of that
It would need to have some sort of healthcheck right ?
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 lolYup did not work 😂
Got a bad gateway
marking as resolved
Marked the thread as resolved.