A kernel gateway dockerfile that works on local but not on Qovery

I have a Jupyter Python Notebook that is exposing an HTTP Server via Kernel Gateway. The dockerfile works locally perfectly, but when I deploy it on Qovery, it seems to be stuck.

My Dockerfile

FROM jupyter/scipy-notebook:latest AS base


RUN pip install --no-cache-dir jupyter_kernel_gateway jupyter

COPY . .

RUN pip install --no-cache-dir -r ./requirements.txt


CMD ["jupyter", \
    "kernelgateway", \
    "--KernelGatewayApp.api", "kernel_gateway.notebook_http", \
    "--KernelGatewayApp.seed_uri", "/app/src/notebooks/NB1.ipynb", \
    "--KernelGatewayApp.prespawn_count", "1", \
    "--KernelGatewayApp.env_process_whitelist", "OPENAI_KEY", \
    "--KernelGatewayApp.env_process_whitelist", "GOOGLE_PRIVATE_KEY_ID", \
    "--KernelGatewayApp.env_process_whitelist", "GOOGLE_PRIVATE_KEY", \
    "--KernelGatewayApp.env_process_whitelist", "GOOGLE_CLIENT_EMAIL", \
    "--KernelGatewayApp.env_process_whitelist", "GOOGLE_CLIENT_ID", \
    "--KernelGatewayApp.env_process_whitelist", "PINECONE_API_KEY", \
    "--KernelGatewayApp.env_process_whitelist", "PINECONE_ENV", \
    "--KernelGatewayApp.env_process_whitelist", "PINECONE_INDEX_NAME", \
    "--KernelGatewayApp.env_process_whitelist", "MEROKU_API_KEY", \
    "--KernelGatewayApp.port", "8080", \
    "--KernelGatewayApp.ip", "", \
    "--Application.log_level", "DEBUG", \
    "--JupyterApp.log_level", "DEBUG", \
    "--KernelGatewayApp.log_level", "DEBUG" \

My code structure is as below

When I run this on my local, it works and I get the following output

However, when I run it on Qovery, I get an output which seems to be stuck

Could this be due to the fact that many TCP ports are being used to listen on? The Kernel listens on these random ports.

Hey @r4881t

Do you mind sharing your app Qovery console link so I can have a look?

Also how much CPU do you have for this app on Qovery side? How much does your container has when launched locally?


Hi @bchastanier ,

My console URL is Qovery

I have allocated vCPU size of 1000 and memory of 2000.

I have also opened a bug on kernel_gateway repo at Gateway seems to be stuck when deploying on cloud · Issue #385 · jupyter-server/kernel_gateway · GitHub

When I run it locally, the usage is as below

It was the memory. I updated to use 3000 memory and now it works just fine.

Should have done this earlier. Thanks for the direction.

Magnifique, thanks for the update ! :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.