How to create a custom Docker container to use with Google Workbench and connect to Proxy?
Create the following Dockerfile
FROM python:3.11.3-bullseye
# Install JupyterLab and any other required packages
RUN pip install jupyter -U && pip install jupyterlab
# Expose the JupyterLab port
EXPOSE 8080
ENV pwd=""
ENTRYPOINT exec jupyter-lab --no-browser --ip=0.0.0.0 --port=8080 --port-retries=0 --allow-root --NotebookApp.token="$pwd" --NotebookApp.password="$pwd" --ServerApp.allow_origin="*" --ServerApp.root_dir="/home/jupyter" --ServerApp.allow_origin_pat="(https?://)?[0-9a-z]+-dot-[\-0-9a-z]*\.notebooks\.googleusercontent\.com" --ServerApp.disable_check_xsrf=True --ServerApp.allow_remote_access=True
PROJECT_ID=""
CONTAINER_NAME
CONTAINER_URL=gcr.io/${PROJECT?}/${CONTAINER_NAME?}:dev`
docker build -t ${CONTAINER_URL} .
docker push ${CONTAINER_URL}
${CONTAINER_URL}
Just as a reference, this post answers the question submitted here where a policy organization does not allow external internet access, limiting package installation and/or using different Python verions in Vertex AI.