Coder Social home page Coder Social logo

ryanfox1985 / docker-slic3r-prusa3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidk/docker-slic3r-prusa3d

0.0 1.0 0.0 11 KB

Slic3r in a Docker container (Prusa3D fork) - Dockerfile and supporting script (automated updates)

Home Page: https://hub.docker.com/r/keyglitch/docker-slic3r-prusa3d/

License: Other

Shell 100.00%

docker-slic3r-prusa3d's Introduction

docker-slic3r-prusa3d

Containerized Slic3r (Prusa3D version/fork) - Dockerfile and supporting script

The header of the Dockerfile has more documentation, but to grab and run this (built on the Docker hub):

docker run -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/Slic3r/3d:z -v slic3rSettings:/home/slic3r -e DISPLAY=$DISPLAY --rm keyglitch/docker-slic3r-prusa3d

  • Your current directory will be mounted into the container at /Slic3r/3d (change the :z option as appropriate to :rw/:ro).

  • Settings are persisted into the slic3rSettings volume.

  • SELinux might block access to X by slic3r inside the container. Look in /var/log/messages or /var/log/audit/audit.log to see if this is happening (and for the relevant commands to fix).

  • Alternatively, there might be a plain permission error upon trying to access X. Try running xhost local:root to fix (this is a temporary fix and must be reapplied when restarting the host).

Sample error example (it's pretty cryptic, sigh):

No protocol specified
19:13:54: Error: Unable to initialize GTK+, is DISPLAY set properly?
Failed to initialize wxWidgets at /Slic3r/slic3r-dist/lib/site_perl/5.22.0/Slic3r/GUI/2DBed.pm line 10.
Compilation failed in require at /Slic3r/slic3r-dist/lib/site_perl/5.22.0/Slic3r/GUI/2DBed.pm line 10.
BEGIN failed--compilation aborted at /Slic3r/slic3r-dist/lib/site_perl/5.22.0/Slic3r/GUI/2DBed.pm line 10.
Compilation failed in require at /Slic3r/slic3r-dist/lib/site_perl/5.22.0/Slic3r/GUI.pm line 9.
BEGIN failed--compilation aborted at /Slic3r/slic3r-dist/lib/site_perl/5.22.0/Slic3r/GUI.pm line 9.
Compilation failed in require at (eval 87) line 1.

Building the latest release locally

If the hub version is ever out of date (or for any other reason), it is possible to build an image locally. getLatestSlic3rRelease.sh will automatically try to get the latest non-AppImage version through the GitHub API during the build process.

Building:

$ docker build -t docker-slic3r-prusa3d .
Sending build context to Docker daemon 73.73 kB
Step 1 : FROM debian:stretch
[ .. truncated ..]

Convenience Script

A small script is provided with the docker run command above for placing in a folder referenced by $PATH. It also contains a commented out snippet for entering the container and fixing the persisted volume when things go wrong (or just for poking around).

Example

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/davidk/.local/bin:/home/davidk/bin
$ cp slic3r.sh /home/davidk/.local/bin/slic3r
$ slic3r

docker-slic3r-prusa3d's People

Contributors

davidk avatar

Watchers

 avatar

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.