From 1cf90efe03180cba0d131acbf61c3cadfdd70fbc Mon Sep 17 00:00:00 2001 From: Samit Mohnot <106000727+AnotherSamWithADream@users.noreply.github.com> Date: Tue, 24 Dec 2024 07:18:24 -0600 Subject: [PATCH] Many Docker Building Fixes/Improvements (#6552) * Update DockerBuild.sh Ensure that the X11 server allows connections from the Docker container. * Update DockerBuild.sh Removed fix for X11. Will add to DockerRun.sh * Update DockerRun.sh Added help comment to fix and ensure that your X11 server allows connections from the Docker container. * linxu build with docker in readme Add build on linux with docker section * Update README.md * Update README.md * Update README.md remove low ram thing * Update Dockerfile --------- Co-authored-by: samthebest699 <106000727+samthebest699@users.noreply.github.com> Co-authored-by: SoftFever --- DockerBuild.sh | 1 - DockerRun.sh | 2 ++ Dockerfile | 6 +++--- README.md | 18 +++++++++++++----- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/DockerBuild.sh b/DockerBuild.sh index 18b7777bf..99c499b52 100755 --- a/DockerBuild.sh +++ b/DockerBuild.sh @@ -2,7 +2,6 @@ PROJECT_ROOT=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)") set -x - # Wishlist hint: For developers, creating a Docker Compose # setup with persistent volumes for the build & deps directories # would speed up recompile times significantly. For end users, diff --git a/DockerRun.sh b/DockerRun.sh index c06628e6b..c05022b1b 100755 --- a/DockerRun.sh +++ b/DockerRun.sh @@ -5,6 +5,8 @@ set -x # -h $HOSTNAME \ # If there's problems with the X display, try this # -v /tmp/.X11-unix:/tmp/.X11-unix \ +# If you get an error like "Authorization required, but no authorization protocol specified," run line 9 in your terminal before rerunning this program +# xhost +local:docker docker run \ `# Use the hosts networking. Printer wifi and also dbus communication` \ --net=host \ diff --git a/Dockerfile b/Dockerfile index 868779b0a..3e8a33f3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,14 +68,14 @@ WORKDIR OrcaSlicer RUN ./BuildLinux.sh -u # Build dependencies in ./deps -RUN ./BuildLinux.sh -d +RUN ./BuildLinux.sh -dr # Build slic3r -RUN ./BuildLinux.sh -s +RUN ./BuildLinux.sh -sr # Build AppImage ENV container podman -RUN ./BuildLinux.sh -i +RUN ./BuildLinux.sh -ir # It's easier to run Orca Slicer as the same username, # UID and GID as your workstation. Since we bind mount diff --git a/README.md b/README.md index 88f587db9..4db8501db 100644 --- a/README.md +++ b/README.md @@ -103,11 +103,19 @@ Explore the latest developments in Orca Slicer with our nightly builds. Feedback - Run => Options tab => Document Versions: uncheck `Allow debugging when browsing versions` - menu bar: Product => Run -- Ubuntu - - Dependencies **Will be auto-installed with the shell script**: `libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo` - - run 'sudo ./BuildLinux.sh -u' - - run './BuildLinux.sh -dsir' - +- Linux (All Distros) + - Docker + - Dependencies: Docker [Installation Instructions](https://www.docker.com/get-started/), git + - clone this repository `git clone https://github.com/SoftFever/OrcaSlicer` + - run `cd OrcaSlicer` + - run `./DockerBuild.sh` + - To run OrcaSlicer: + - run `./DockerRun.sh` + - For most common errors, open `DockerRun.sh` and read the comments. + - Ubuntu + - Dependencies **Will be auto installed with the shell script**: `libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo` + - run 'sudo ./BuildLinux.sh -u' + - run './BuildLinux.sh -dsir' # Note: If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.