Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build on CentOS Stream 9 #118

Open
plysdyret opened this issue Jun 29, 2023 · 3 comments
Open

Unable to build on CentOS Stream 9 #118

plysdyret opened this issue Jun 29, 2023 · 3 comments
Assignees
Labels
subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues

Comments

@plysdyret
Copy link

plysdyret commented Jun 29, 2023

Description

Trying to build on CentOS Stream 9 bare metal server fails as root:

... COMMIT coral-edgetpu-ubuntu-18.04 --> 3d1d0547343 Successfully tagged localhost/coral-edgetpu-ubuntu-18.04:latest 3d1d0547343ed555d2eabfe644bf4bd1017f84af02081101b315335a1aa00278 docker run --rm -i --tty -v /root/pycoral/:/workspace \ "coral-edgetpu-ubuntu-18.04" /bin/bash -c "chmod a+w /; groupadd --gid 0 root; useradd -m -e '' -s /bin/bash --gid 0 --uid 0 root; echo 'root ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; su root -c 'for cpu in k8 aarch64 armv7a; do make CPU=\${cpu} COMPILATION_MODE=opt -C /workspace/ pybind tflite wheel tflite-wheel || exit 1; done'" Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. groupadd: group 'root' already exists useradd: user 'root' already exists su: System error make: *** [/root/pycoral/libcoral/docker/docker.mk:40: docker-build] Error 1 ...

And fails as a regular user:

... INFO: Build completed successfully, 708 total actions mkdir -p /workspace/pycoral/pybind mkdir: cannot create directory '/workspace/pycoral/pybind': Permission denied ...

Click to expand!

Issue Type

Build/Install

Operating System

Linux

Coral Device

No response

Other Devices

No response

Programming Language

Python 3.9

Relevant Log Output

No response

@google-coral-bot google-coral-bot bot added subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues labels Jun 29, 2023
@hjonnala
Copy link
Contributor

hjonnala commented Jun 29, 2023

... INFO: Build completed successfully, 708 total actions mkdir -p /workspace/pycoral/pybind mkdir: cannot create directory '/workspace/pycoral/pybind': Permission denied ...

Please add the sudo before docker command and try to build it: pycoral/libcoral/docker/docker.mk:40:

@chrisruk
Copy link

@hjonnala Is there another solution to adding sudo, I tried that in Ubuntu 22.04, where I am getting a similar permission denied issue.

After prepending sudo I got -

"docker: Error response from daemon: pull access denied for coral-edgetpu-ubuntu-18.04, repository does not exist or may require 'docker login': denied: requested access to the resource is denied."

@chrisruk
Copy link

I managed to get around the permission denied issue doing the following -

diff --git a/docker/docker.mk b/docker/docker.mk
index 0609036..1483a68 100644
--- a/docker/docker.mk
+++ b/docker/docker.mk
@@ -32,11 +32,11 @@ docker-image:
            --build-arg IMAGE=$(DOCKER_IMAGE) $(DOCKER_MK_DIR)
 
 docker-shell: docker-image
-       docker run --rm -i --tty -v $(DOCKER_WORKSPACE):$(WORKSPACE) \
+       docker run --rm -i --tty -v $(DOCKER_WORKSPACE):$(WORKSPACE):z \
            --workdir $(WORKSPACE)/$(DOCKER_WORKSPACE_CD) \
-           $(DOCKER_TAG) /bin/bash -c "$(call run_command,$(DOCKER_SHELL_COMMAND))"
+           $(DOCKER_TAG) /bin/bash -c "$(call $(DOCKER_SHELL_COMMAND))"
 
 docker-build: docker-image
-       docker run --rm -i $(shell tty -s && echo --tty) -v $(DOCKER_WORKSPACE):$(WORKSPACE) \
-           $(DOCKER_TAG) /bin/bash -c "$(call run_command,$(MAKE_COMMAND))"
+       docker run --rm -i $(shell tty -s && echo --tty) -v $(DOCKER_WORKSPACE):$(WORKSPACE):z \
+           $(DOCKER_TAG) /bin/bash -c "$(call $(MAKE_COMMAND))"

Would be interested on how suitable this approach is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

3 participants