Skip to content

Commit cebf30d

Browse files
olliesilvesteradaudon
authored andcommitted
Fix devcontainer dodal and dlstbx (#1621)
1 parent 568b349 commit cebf30d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"UV_PROJECT_ENVIRONMENT": "/cache/venv-for${localWorkspaceFolder}",
1717
// Do the equivalent of "activate" the venv so we don't have to "uv run" everything
1818
"VIRTUAL_ENV": "/cache/venv-for${localWorkspaceFolder}",
19-
"PATH": "/cache/venv-for${localWorkspaceFolder}/bin:${containerEnv:PATH}"
19+
"PATH": "/cache/venv-for${localWorkspaceFolder}/bin:${containerEnv:PATH}",
20+
"PYTHONPATH": "/dls_sw/apps/dials/latest/latest/modules/dlstbx/src:${containerEnv:PYTHONPATH}"
2021
},
2122
"customizations": {
2223
"vscode": {
@@ -75,7 +76,7 @@
7576
// Allow the container to access the host X11 display and EPICS CA
7677
"--net=host",
7778
// Make sure SELinux does not disable with access to host filesystems like tmp
78-
"--security-opt=label=disable"
79+
"--security-opt=label=disable",
7980
],
8081
"mounts": [
8182
// Mount in the user terminal config folder so it can be edited
@@ -84,6 +85,11 @@
8485
"target": "/user-terminal-config",
8586
"type": "bind"
8687
},
88+
{
89+
"source": "/dls_sw/apps/dials/latest/latest/modules/dlstbx/src",
90+
"target": "/dls_sw/apps/dials/latest/latest/modules/dlstbx/src",
91+
"type": "bind"
92+
},
8793
// Keep a persistent cross container cache for uv, pre-commit, and the venvs
8894
{
8995
"source": "devcontainer-shared-cache",
@@ -93,9 +99,6 @@
9399
],
94100
// Mount the parent as /workspaces so we can pip install peers as editable
95101
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
96-
"mounts": [
97-
"source=/dls_sw/apps/dials/latest/latest/modules/dlstbx/src/dlstbx/,target=/dls_sw/apps/dials/latest/latest/modules/dlstbx/src/dlstbx/,type=bind,consistency=cached"
98-
],
99102
// After the container is created, recreate the venv then make pre-commit first run faster
100-
"postCreateCommand": "uv venv --clear && uv sync && pre-commit install --install-hooks"
103+
"postCreateCommand": "uv venv --clear && uv sync && uv pip install -e /workspaces/dodal && pre-commit install --install-hooks"
101104
}

0 commit comments

Comments
 (0)