bullwinkle3000/dactyl-keyboard

Unable to run due to cryptic git error

Trecoolius opened this issue · 2 comments

Trying to run the supplied script, but I think the dependencies are messed up:

(dactyl-keyboard) C:\Users\xxx\Documents\dactyl-keyboard-wilder>python src/dactyl_manuform.py
Traceback (most recent call last):
  File "C:\Users\xxx\Documents\dactyl-keyboard-wilder\src\dactyl_manuform.py", line 2619, in <module>
    make_dactyl()
  File "C:\Users\xxx\Documents\dactyl-keyboard-wilder\src\dactyl_manuform.py", line 198, in make_dactyl
    git_data = get_git_info()
  File "C:\Users\xxx\Documents\dactyl-keyboard-wilder\src\dactyl_manuform.py", line 32, in get_git_info
    repo = git.Repo(search_parent_directories=True)
  File "C:\Users\xxx\.conda\envs\dactyl-keyboard\lib\site-packages\git\repo\base.py", line 276, in __init__
    raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\Users\xxx\Documents\dactyl-keyboard-wilder

(dactyl-keyboard) C:\xxx\John\Documents\dactyl-keyboard-wilder>

Using Python 3.9.18

I can fix at least some dependencies, see attached Dockerfile. I got rid of some of the cleanup commands, so this will make a bigger image set, but it makes it easier to manually fix the dependencies afterwards.

However, that doesn't fix it: The problem is that it is looking for the .git folder, which the volume in the docker container cannot see because it is mounting src/ in the container, and that is deeper inside the git.

FROM mambaorg/micromamba:0.8.2

RUN apt-get update && \
    apt-get install -y libgl1-mesa-glx gcc bash git

WORKDIR /app
RUN micromamba install -y -n base -c conda-forge -c cadquery \
    python=3 \
    cadquery=master \
    numpy=1 \
    scipy=1 gitpython

RUN pip3 install solidpython


WORKDIR /app/src

I tried cloneing the git repo inside the shell and running stuff manually, but got nowhere.

Basically, I think this is something that works in whatever setup the main developer is using, but they have made some changes that break the docker setup.

Thanks, I made it work, but I am not using a dockerfile.