Skip to content

Commit

Permalink
Fixed last review findings
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Mar 27, 2024
1 parent 5dc38fe commit a84f512
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
14 changes: 8 additions & 6 deletions doc/changes/changes_1.1.0.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# AI-Lab 1.1.0 released tbd

Code name: TBD
Code name: Second Release

## Summary

tbd
The following changes are especially important if you are using the AI-Lab's Docker Edition and are [mounting a volume](../user_guide/docker/managing-user-data.md) containing your private notebook files and the [Secure Configuration Storage](../user_guide/docker/secure-configuration-storage.md) (SCS) into the AI-Lab's Docker container.

This release changes the mount-point for Jupyter notebook files and the [Secure Configuration Storage](../user_guide/docker/secure-configuration-storage.md) from `/root/notebooks` to `/home/jupyter/notebooks`.
So in case you are mounting a volume containing your private notebook files into the AI-Lab's Docker container, then please change your commands to use the new mount point as described in the [User Guide](../user_guide/docker/docker-usage.md#creating-a-docker-container-for-the-ai--lab-from-the-ai-lab-docker-image).
Major changes

Please note that the libraries and dependencies of the AI-Lab have changed since release 1.0.0 which can break some of the cells in old notebooks. So in case of problems, please do **not mount** notebook files created by an older version of the AI-Lab but create a new empty volume.
1. The mount-point for Jupyter notebook files and the SCS has moved from `/root/notebooks` to `/home/jupyter/notebooks`.
2. Some of the notebooks have been updated, especially the Cloud storage notebook.

See also [Managing User Data](../user_guide/docker/managing-user-data.md).
In case you are using the AI-Lab's Docker Edition with mounted volume, then please
1. Change your commands to use the new mount point as described in the [User Guide](../user_guide/docker/docker-usage.md#creating-a-docker-container-for-the-ai--lab-from-the-ai-lab-docker-image) and
2. Find the updated notebooks in folder `/home/jupyter/notebook-defaults` as the AI-Lab does not overwrite existing files, to avoid losing manual changes.

## AI-Lab-Release

Expand Down
18 changes: 16 additions & 2 deletions test/integration/test_create_dss_docker_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,20 @@ def test_write_socket_known_gid(
inspector.assert_write_to_socket()


def docker_image_getenv(image_name: str, variable: str) -> str:
client = docker.from_env()
image = client.images.get(image_name)
client.close()
def pair(entry: str) -> Tuple[str,str]:
parts = entry.partition("=")
return parts[0], parts[2],

env = dict([pair(e) for e in image.attrs["Config"]["Env"]])
return env.get(variable, None)


def test_chown_notebooks(request, tmp_path, group_changer, dss_docker_image):
def ls_command(old_path: str, new_path: Path, args: List[Path]) -> str:
def ls_command(old_path: str, new_path: str, args: List[Path]) -> str:
args = (str(p).replace(old_path, new_path) for p in args)
return "ls -ld " + " ".join(args)

Expand All @@ -274,7 +286,9 @@ def user_and_group(ls_line: str) -> str:
grand_child.touch()
group_changer.chown_chmod_recursive("root:root", "777", tmp_path)

notebooks_folder = "/home/jupyter/notebooks"
notebooks_folder = docker_image_getenv(
dss_docker_image.image_name,
"NOTEBOOK_FOLDER_FINAL")
with container_context(
request,
image_name=dss_docker_image.image_name,
Expand Down

0 comments on commit a84f512

Please sign in to comment.