Coder Social home page Coder Social logo

Comments (9)

marghidanu avatar marghidanu commented on June 16, 2024

You installed Docker but your user probably doesn't have permission to run it. Add your user to the docker group and retry.

See this: https://docs.docker.com/engine/install/linux-postinstall/

from primes.

herkulessi avatar herkulessi commented on June 16, 2024

This is not the case: I start the make from a root shell (which should be enough) that is part of the docker group. I can run one of the Docker containers manually just with docker run primezig_solution_3 (zig/solution_3 as an example here), but runnning make from the same shell fails.

from primes.

rbergen avatar rbergen commented on June 16, 2024

To be honest, I don't think running things as root is the right premise for anything.

Can you successfully build and run solutions individually/manually under a regular/non-root user account? If so, could you please share the output of the docker build and docker run of at least one of them?

Also, please provide the output of the following commands:

uname -a

and

lsb_release -a

from primes.

marghidanu avatar marghidanu commented on June 16, 2024

The benchmark tool uses the Docker command behind the scenes to build the images. You can try building one manually and see what the output is.

from primes.

herkulessi avatar herkulessi commented on June 16, 2024

C Solution 1 as an example: Running inside the PrimeC/solution_1/ folder

user@hostname $ docker build -t primes .
Sending build context to Docker daemon  18.43kB
Step 1/5 : FROM ubuntu:20.04
 ---> 825d55fb6340
Step 2/5 : RUN apt-get update && apt-get install -y build-essential     && apt-get clean     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> c18b933c2003
Step 3/5 : WORKDIR /home/primes
 ---> Using cache
 ---> 55325d1c3185
Step 4/5 : COPY sieve.c prime-check.h run ./
 ---> Using cache
 ---> d6d30740af06
Step 5/5 : ENTRYPOINT ["./run"]
 ---> Using cache
 ---> a41922c9bbfe
Successfully built a41922c9bbfe
Successfully tagged primes:latest
user@hostname $ docker run --rm primes
mckoss-c830;23587;5.0;1;algorithm=wheel,faithful=yes,bits=1
user@hostname $

I only ran it as root in the first place, to avoid permission issues, that might cause it. I don't usually run stuff as root.

from primes.

rbergen avatar rbergen commented on June 16, 2024

@herkulessi Thanks for the docker command output.

Could you also provide the output of the uname -a and lsb_release -a commands?

from primes.

herkulessi avatar herkulessi commented on June 16, 2024

@rbergen Sorry, forgot those two....

Linux hostname 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

from primes.

rbergen avatar rbergen commented on June 16, 2024

@herkulessi No problem.

I see nothing that stands out in what you've shared. So, summarizing:

  • You can run docker under your regular user account, but
  • You get permission errors on the docker socket when running the benchmark (by the way, is there an exact error you can quote?), and
  • The previous point is true even when you run the benchmark as root

It almost seems like the benchmark (nodejs) somehow executes as a separate user that is not a member of the docker group. You could try running ps axo stat,euser,ruser,ppid,pid,pcpu,comm a number of times while the benchmark runs (or in your case, tries to), to see if anything that points in this direction show up in/around the processes started by the benchmark.

from primes.

herkulessi avatar herkulessi commented on June 16, 2024

I just did the same thing again, but for some reason it worked now (At least mostly, some Docker containers wont run for some unrelated reason, I can prolly fix that myself)
I changed nothing about my setup: Same Node isntall, same OS install, same Machine, I didn't even reboot inbetween...
Im gonna close this now, who knows what was the problem.

from primes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.