(Win10) ModuleNotFoundError: No module named 'pwd'

On windows, when running aicrowd-repo2docker .\build.sh I get the following error:

I believe the problem is because pwd is linux only.

  File "c:\users\ml-2 windows\appdata\local\conda\conda\envs\obs\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ml-2 windows\appdata\local\conda\conda\envs\obs\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\ml-2 windows\AppData\Local\conda\conda\envs\obs\Scripts\aicrowd-repo2docker.exe\__main__.py", line 5, in <module>
  File "c:\users\ml-2 windows\appdata\local\conda\conda\envs\obs\lib\site-packages\repo2docker\__main__.py", line 1, in <module>
    from .app import Repo2Docker
  File "c:\users\ml-2 windows\appdata\local\conda\conda\envs\obs\lib\site-packages\repo2docker\app.py", line 15, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

I also tried aicrowd-repo2docker . and received the same error

@joe_booth : I just realised that aicrowd-repo2docker 's support for Windows is still experimental. Is it possible for you to try to test this on mac or linux ?

Else community contributions for a general Dockerfile are really welcome !

@mohanty Here is a custom Dockerfile I made, with some details in the first comment. I made this Dockerfile from the standard aicrowd-repo2docker dockerfile, but without conda (too slow) and with some changes in the order of the COPY instructions to avoid re-installing all python packages only when my source files changed.

1 Like

@mikael.capelle: Thats really great !! Thanks !! We should try to merge this into the starter-kit to give alternatives to people.

And I agree, aicrowd-repo2docker is slow, and I would personally prefer having just Dockerfiles to capture the software runtime. But unfortunately many participants find it difficult to work with Dockerfiles, and prefer simply working at the level of Conda environments, and in the end “exporting” their conda environments. If the landscape changes, and people find Dockerfiles much easier to deal with, I would jump at the first opportunity to move back to just Dockerfiles.