Daniel Davee
06/28/2021, 6:11 PMDocker(
files={
# absolute path source -> destination in image
"/Users/me/code/my_mods/": "/my_mods",
},
env_vars={
# append modules directory to PYTHONPATH
"PYTHONPATH": "$PYTHONPATH:modules/"
},
)
Kevin Kho
shutil.copytree
to copy the folder. Code . Are you seeing different behavior?Daniel Davee
06/28/2021, 7:20 PMKevin Kho
Daniel Davee
06/28/2021, 7:41 PMKevin Kho
Daniel Davee
06/28/2021, 7:46 PMKevin Kho
Dockerfile
or the Docker(files=…)
? I think the path of the place running might be different from what you are expecting. This will be easier if you make a minimal package by adding a setup.py
to your project and then pip install
the dependency in your Dockerfile. Would you like an example of that?Daniel Davee
06/28/2021, 7:58 PMKevin Kho
Daniel Davee
06/28/2021, 7:59 PMKevin Kho
pip -install -e .
and the setup.py
to install that dependency as a package