Comments (12)
Thanks for reporting this!
I just inspected the Docker configuration. make docker-start-interactive
drops you into a Docker container as root
. Any command you run that creates files will have the behavior you describe on your host. Looking at what the command actually executes:
$ make docker-start-interactive
docker run \
-it \
--rm \
--shm-size=1G \
-e AWS_DEFAULT_REGION \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e DISPLAY=:1 \
-v /home/tk-woven/dgp:/home/dgp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.ssh:/root/.ssh \
-v ~/.aws:/root/.aws \
-v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 \
--net=host \
--ipc=host
I don't see any mapped files that look like the pre-commit cache. So, pre-commit should only be placing files inside the context of your container. That the error you see is in particular is with permissions under .git
, I suspect this is related to running git operations only. This will affect your host as the codebase is bind-mounted from your host into the container.
As for the git issues inside the container, git
does not seem to be provided in the image fetched by docker pull ghcr.io/tri-ml/dgp:master
. I'm guessing you installed it locally.
Bad owner or permissions on /root/.ssh/config
Since you are operating as root, I believe what is happening here is that git is refusing to use your SSH identity because your active user is root
but the uid/gid on your ssh files is brought in from your host environment and is not literally root
.
from dgp.
BTW I've never actually used the Docker container for development myself, only the virtual environment. I'm guessing the folks who set up this workflow only intend for users to make code changes inside the container and not perform git operations. We'd still hit permissions issues if people created even source files inside the container, though.
from dgp.
I'm guessing you installed it locally.
Right, the GETTING STARTED
also provides instructions on this
To set up linters wherever you plan on using git from (either on your host or inside the container), run
# If in Docker, run the following; otherwise skip this block.
dgp$ apt update
dgp$ apt install -y git
dgp$ git config --global --add safe.directory /home/dgp
# Set up the linters.
dgp$ make setup-linters
BTW I've never actually used the Docker container for development myself, only the virtual environment. I'm guessing the folks who set up this workflow only intend for users to make code changes inside the container and not perform git operations.
Hm understood. So I should run pre-commit
separately inside container and always commit with --no-verify
outside container...
from dgp.
Btw from the docs, it seems the workflow allows for users to use git inside the container (just not on devices where user doesn't have root permissions I guess...)
To set up linters wherever you plan on using git from (either on your host or inside the container)
from dgp.
Thanks; maintainers should probably change the docs to avoid guiding users into the situation you found yourself in. I have to delegate this at this time, though.
from dgp.
Maybe an opportunity for @ryo-takahashi-1206 and company to support?
from dgp.
Thank you for sharing. I will do the followings within 1 week:
- Try bringing the host UID to the container
- if no one is affected, make this the default behavior
- Otherwise, invent some option to bring the host UID
- Or, show alarts in
make docker-start-interactive
and the relvant docs
from dgp.
Thanks so much Takahashi-san; SGTM :)
from dgp.
Thank you Tyler and Takahashi-san 🙇♀️
from dgp.
Linking the fix for the issue: #138
from dgp.
@nehalmamgain
Please close this issue if you become happy with #138 🙇
from dgp.
Thank you for the fix!
from dgp.
Related Issues (16)
- Pre-push hook prevents from pushing to fork of DGP repository. HOT 3
- `make build-proto` and `make test` fail after following Getting Start instructions HOT 1
- `build-docker` GH Actions workflow fails on master HOT 2
- Difficult for users to locally run linters used in CI HOT 5
- Docs build tracks latest docs but shows old version HOT 5
- no 3d annotation in dataset HOT 1
- Parallel Domain GUDA dataset link broken HOT 2
- Semantic label for lidar HOT 2
- error in class name imported in visualize_dataset.py HOT 1
- DGP Proto: Which Ontology message to be used? HOT 1
- How to view and access 'depth' information HOT 2
- Missing 'key_line_2d' in `ONTOLOGY_REGISTRY` HOT 4
- Questions about DDAD_tiny dataset. HOT 1
- ERROR: Cannot install -r requirements.txt (line 2) and botocore==1.12.79 because these package versions have conflicting dependencies. HOT 3
- When to publish the DDAD15M datasets?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgp.