Skip to content

Commit 9f46de8

Browse files
xiu-csderuyter92
andauthored
Update Dockerfile
Co-authored-by: Jaap de Ruyter van Steveninck <32810691+deruyter92@users.noreply.github.com>
1 parent 89ff316 commit 9f46de8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ RUN python -m pip install --no-cache-dir --upgrade pip && \
3131
rm -rf /tmp/fmpose3d
3232

3333
# Allow non-root user to download DLC model weights at runtime
34-
RUN mkdir -p /opt/conda/lib/python3.11/site-packages/deeplabcut/modelzoo/checkpoints && \
35-
chown -R ${USERNAME}:${USERNAME} /opt/conda/lib/python3.11/site-packages/deeplabcut/modelzoo
34+
RUN DLC_MODELZOO_DIR="$(python -c "import site, pathlib; print(pathlib.Path(site.getsitepackages()[0]) / 'deeplabcut' / 'modelzoo')")" \
35+
&& mkdir -p "${DLC_MODELZOO_DIR}/checkpoints" \
36+
&& chown -R "${USERNAME}:${USERNAME}" "${DLC_MODELZOO_DIR}"
3637

3738
# Set your user as owner of the home directory before switching
3839
RUN chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}

0 commit comments

Comments
 (0)