hcp4715 / dockerHDDM

A docker image for running HDDM with parallel processing in jupyter notebook.
https://hub.docker.com/r/hcp4715/hddm
25 stars 6 forks source link

Missing "Work" Folder #12

Closed OmarViera-Resto closed 4 months ago

OmarViera-Resto commented 4 months ago

Hi all,

I'm wondering if the Docker method to access dockerHDDM has been updated. When I run the example code docker run -v $(pwd):/home/jovyan/work -p 8888:8888 -it --rm hcp4715/hddm jupyter notebook from the Drift Diffusion Modeling with dockerHDDM paper, my Jupyter Notebook does not contain a "Work" folder. My questions then are:

  1. Is there a step I may have overlooked when creating the Docker container?
  2. Is there another way to mount files to the container?

p.s. I'm using macOS Sonoma 14.5 and M1 chip.

Thank you for your time and input!

Screenshot 2024-06-01 at 1 51 19 AM
hcp4715 commented 4 months ago

@OmarViera-Resto thanks very much for your feedback,

I just copied and pasted the code and run on my Macbook (m1 chips, sonoma 14.4.1), it worked (after downloading the docker image).

image

So I tried different ways to get the current folder using pwd, if using the code below, the work folder would not appear:

docker run -v ${pwd}:/home/jovyan/work -p 8888:8888 -it --rm hcp4715/hddm jupyter notebook

but this one worked again:

docker run -v ${PWD}:/home/jovyan/work -p 8888:8888 -it --rm hcp4715/hddm jupyter notebook

So the issue is whether the code $(pwd) return the path of the working folder. I tried a few different combination with echo:

image

some of them worked, $(pwd), $PWD, ${PWD} but others not. You may try it out on your machine.

Another way to mount your working folder is using its absolute path, in my case /Volumes/T3/Dell5510/Exp_Modeling/DDM/ddm_stim_coding, it worked too. The complete docker code is

docker run -v /Volumes/T3/Dell5510/Exp_Modeling/DDM/ddm_stim_coding:/home/jovyan/work -p 8888:8888 -it --rm hcp4715/hddm jupyter notebook

hope this helps.

Chuan-Peng

OmarViera-Resto commented 4 months ago

Hi Chuan-Peng,

Thank you for your help! I changed my code to ${PWD} and it is working great.

Best regards,

Omar