bdtinc / maskcam

Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.
MIT License
243 stars 83 forks source link

Error trying to : docker build . -t custom_maskcam #21

Closed Raphenri09 closed 2 years ago

Raphenri09 commented 2 years ago

I would like to build a custom_maskcam container. My goal is to get a better understanding of the architecture of the project and to eventually train my own dataset. Right now I simply cloned the repository on my jetson nano. When I use the command: docker build . -t custom_maskcam inside my maskcam folder I keep getting the same error :

Step 12/28 : RUN export GST_CFLAGS="-pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" && export GST_LIBS="-lgstreamer-1.0 -lgobject-2.0 -lglib-2.0" && git clone https://github.com/GStreamer/gst-python.git && cd gst-python && git checkout 1a8f48a && ./autogen.sh PYTHON=python3 && ./configure PYTHON=python3 && make && make install ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested ---> Running in 3eb0f983b6c4 Cloning into 'gst-python'... Note: checking out '1a8f48a'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b

HEAD is now at 1a8f48a Release 1.14.5

This error occurs when installing gst-python. Can you help me with this issue. Thank you Raphael

DonBraulio commented 2 years ago

Hey @Raphenri09, Thanks for reaching out! Unfortunately, I don't have the setup available now, and I don't remember having that problem. Maybe something changed in the gst-python repository, although the installation instructions don't seem to have changed in the latest Deepstream release docs (check that those commands in the Dockerfile are the same as here).

In order to debug your problem, you can comment out all those lines in the Dockerfile and all the lines below them. Then start the container and try to reproduce the commands separately. I hope that helps solving your problem!

Raphenri09 commented 2 years ago

Hi @DonBraulio, Thank you for your reply. I found the solution to the problem. I had to modify the first RUN command in the DockerFile to make it work : RUN \ apt-get update && apt-get install apt-transport-https ca-certificates -y \ It took me quite some time to find it and yesterday I found out that there is a ImportantCommandLines file in the main folder of maskcam saying exactly this...

DonBraulio commented 2 years ago

Out of curiosity, what ImportantCommandLines file are you referring to? 🤔 Great to know that you solved the problem! And thanks for your fast reply 💪

Raphenri09 commented 2 years ago

HI @DonBraulio , I actually did add this file without remembering it lol My bad