nunofgs / docker-octoprint

Dockerfile to set up Octoprint with x86, armv6, armv7 and arm64 support!
https://hub.docker.com/r/nunofgs/octoprint/
GNU Affero General Public License v3.0
58 stars 32 forks source link

gcc not found when installing Octoprint plugin #4

Closed yipengsun closed 6 years ago

yipengsun commented 6 years ago

Hi,

When trying to install Octoprint plugin gpx, I got the following error message (I've tried both armv6 as well as amd64 docker images):

Command not found: gcc

But it seems that by installing base-devel, gcc should be present.

I'm running out of ideas. Any help is appriciated. Thanks.

nunofgs commented 6 years ago

Hi @ypsun-umd. I was trying to be clever by using a multi-stage Docker build. This way, the resulting Docker image only takes up around 100MB.

The final container doesn't have gcc but I agree that we need some build tools inside the container for installing plugins. I'll make this change and deploy a new version soon.

nunofgs commented 6 years ago

I've just pushed a debian-based image. You should be able to install the gpx plugin now. Have fun!

yipengsun commented 6 years ago

Indeed plugins can be installed now. However the installation seems to be non-persistent---i.e. after restart the docker image, all previously user-installed plugins are gone.

I suppose this is due to the fact that these plugins are installed to /usr. I tried to tick the 'force --user' option, but it is not effective. After all, the /data/plugins folder remains empty.

On a separate note, it seems pip 10.0.x breaks plugin installation, an upstream known bug 1, and will be fixed in octoprint 1.3.9.

One possible workaround is to pin pip to 9.0.3 for octoprint 1.3.8.

nunofgs commented 6 years ago

after restart the docker image, all previously user-installed plugins are gone.

🤔 definitely doesn't happen to me. Are you sure you're not creating a new container? docker restart <id> preserves plugins for me.

I suppose this is due to the fact that these plugins are installed to /usr. I tried to tick the 'force --user' option, but it is not effective.

Right. You could mount a volume for that directory but I wouldn't recommend it since these are platform-specific and precompiled plugins. In my opinion, when deleting/recreating/upgrading the container you should just reinstall the plugins you need (since their settings are preserved).

On a separate note, it seems pip 10.0.x breaks plugin installation, an upstream known bug 1, and will be fixed in octoprint 1.3.9.

I did get the Install UNKNOWN message when installing plugins but after a reboot they were there, so didn't think much of it. I'll push another image with pip pinned to 9.0.3 and revert that change when octoprint 1.3.9 is released.

Thanks!

yipengsun commented 6 years ago

Now everything is working. Thanks!

nunofgs commented 6 years ago

No problem. Glad you’re enjoying this image :)