Closed MattTriano closed 1 year ago
At present, running that makefile recipe starts up a jupyterlab server in the /airflow/great_expectations/
dir (which is mounted as a volume), but you still have to manually copy the URL to the server and paste it into a browser.
Looks like I also need to set the JUPYTER_DATA_DIR
env-var if I want to be able to save notebooks. Set to the path /opt/airflow/.jupyter/share/jupyter
.
Earlier in development, great_expectations expectation and checkpoint development was done in a separate container/service (
py-utils
), which was also in charge of some initial setup tasks. This was very cumbersome and clunky, and when I refactored the startup process to just work with a venv, I eliminated that container. It looks like I made some motions to transition to serving jupyterlab from theairflow-scheduler
service (namely installing relevant packages in the airflow-related image and setting the GE_JUPYTER_CMD env-var that was previously used in thepy-utils
service, but if I figured out how to get GE running in theairflow-scheduler
service's container back then, I should have documented it and memorialized the process, as permissions errors (related to the airflow Dockerfile changing the user fromroot
toairflow
) prevent the container from serving jupyter notebook/lab.From researching, I've found the default paths
jupyter
uses to run a notebook/lab server, as well as the names of env-vars that can set different locations.I've hacked together a strategy for sorting this out, but it feels a bit like a hack. It involves setting env vars the following env-vars in the
.env
fileand making a makefile recipe that makes those dirs before starting up a jupyterlab server
but it feels really hacky to make the dirs this way rather than making them in the Dockerfile. Still, I did try making those dirs in the Dockerfile, and despite many chmodding experiments, my attempts failed as the
airflow
user is not the same as thedefault
user that I have when I get a shell in a container).