From d2969624a8298e92cf07ceff0c4d7e1e507129e4 Mon Sep 17 00:00:00 2001
From: MrLaFitte <140105763+MrLaFitte@users.noreply.github.com>
Date: Mon, 4 Dec 2023 09:32:08 -0600
Subject: [PATCH 1/3] Add docker-compose instructions to README.md, small
markdown formatting changes
---
README.md | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 49bddd0..80b2af8 100644
--- a/README.md
+++ b/README.md
@@ -8,27 +8,33 @@ A lot of this was branched off of dmagyar's awesome [prusaslicer-vnc-docker](htt
## How to use
-**In unraid**
+### In unraid
If you're using unraid, open your Docker page and under `Template repositories`, add `https://github.com/helfrichmichael/unraid-templates` and save it. You should then be able to Add Container for prusaslicer-novnc. For unraid, the template will default to 6080 for the noVNC web instance.
-**Outside of unraid**
+### Outside of unraid
+#### Docker
To run this image, you can run the following command: `docker run --detach --volume=prusaslicer-novnc-data:/configs/ --volume=prusaslicer-novnc-prints:/prints/ -p 8080:8080 -e SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
--name=prusaslicer-novnc prusaslicer-novnc`
This will bind `/configs/` in the container to a local volume on my machine named `prusaslicer-novnc-data`. Additionally it will bind `/prints/` in the container to `superslicer-novnc-prints` locally on my machine, it will bind port `8080` to `8080`, and finally, it will provide an environment variable to keep Prusaslicer happy by providing an `SSL_CERT_FILE`.
-**Using a VNC Viewer**
+#### Docker Compose
+To use the pre-built image, simply clone this repository or copy `docker-compose.yml` and run `docker compose up -d`.
+
+To build a new image, clone this repository and run `docker compose up -f docker-compose.build.yml --build -d`
+
+### Using a VNC Viewer
To use a VNC viewer with the container, the default port for X TigerVNC is 5900. You can add this port by adding `-p 5900:5900` to your command to start the container to open this port for access.
-**GPU Acceleration/Passthrough**
+### GPU Acceleration/Passthrough
Like other Docker containers, you can pass your Nvidia GPU into the container using the `NVIDIA_VISIBLE_DEVICES` and `NVIDIA_DRIVER_CAPABILITIES` envs. You can define these using the value of `all` or by providing more narrow and specific values. This has only been tested on Nvidia GPUs.
-In unraid you can set these values during set up. For containers outside of unraid, you can set this by adding the following params or similar `-e NVIDIA_DRIVER_CAPABILITIES="all" NVIDIA_VISIBLE_DEVICES="all"`
+In unraid you can set these values during set up. For containers outside of unraid, you can set this by adding the following params or similar `-e NVIDIA_DRIVER_CAPABILITIES="all" NVIDIA_VISIBLE_DEVICES="all"`. If using Docker Compose, uncomment the enviroment variables in the relevant docker-compose.yaml file.
## Links
@@ -41,4 +47,4 @@ In unraid you can set these values during set up. For containers outside of unra
[Docker](https://hub.docker.com/r/mikeah/prusaslicer-novnc)
-
\ No newline at end of file
+
From b3b42b1237bdc07ba1a44084b56affce4bd650ff Mon Sep 17 00:00:00 2001
From: MrLaFitte <140105763+MrLaFitte@users.noreply.github.com>
Date: Mon, 4 Dec 2023 09:32:49 -0600
Subject: [PATCH 2/3] Adding docker-compose.yml
---
docker-compose.yml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 docker-compose.yml
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..01c14ca
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,16 @@
+---
+version: "2.1"
+services:
+ prusaslicer-novnc:
+ image: mikeah/prusaslicer-novnc
+ container_name: prusaslicer-novnc
+ environment:
+ - SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
+ #- NVIDIA_DRIVER_CAPABILITIES="all"
+ #- NVIDIA_VISIBLE_DEVICES="all"
+ volumes:
+ - ./prints:/prints/
+ - ./data:/configs/
+ ports:
+ - 8080:8080
+ restart: unless-stopped
From ce6cbc5bb78eb9a35fd8e2c5895930b0d05ee6ba Mon Sep 17 00:00:00 2001
From: MrLaFitte <140105763+MrLaFitte@users.noreply.github.com>
Date: Mon, 4 Dec 2023 09:33:32 -0600
Subject: [PATCH 3/3] Add docker-compose.build.yml
---
docker-compose.build.yml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 docker-compose.build.yml
diff --git a/docker-compose.build.yml b/docker-compose.build.yml
new file mode 100644
index 0000000..7eccdb7
--- /dev/null
+++ b/docker-compose.build.yml
@@ -0,0 +1,16 @@
+---
+version: "2.1"
+services:
+ prusaslicer-novnc:
+ image: mikeah/prusaslicer-novnc
+ build: .
+ environment:
+ - SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
+ #- NVIDIA_DRIVER_CAPABILITIES="all"
+ #- NVIDIA_VISIBLE_DEVICES="all"
+ volumes:
+ - ./prints:/prints/
+ - ./data:/configs/
+ ports:
+ - 8080:8080
+ restart: unless-stopped