Skip to content
Merged
44 changes: 39 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,42 @@
.git
input
output
target
# os-specific stuff
.DS_Store
Thumbs.db
desktop.ini

# code editors
.vscode/

# git & docs
.git/
.github/
docs/
LICENSE
.gitignore
.gitattributes
*.md

# docker
.dockerignore
docker-compose.yml
Dockerfile

# environment variables
*.env*

# vertd folders
permanent/
input/
output/

# rust output
target/

# ffmpeg
ffmpeg.exe
ffmpeg
ffprobe.exe
ffprobe
ffprobe

# nix stuff
flake.nix
flake.lock
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ COPY --from=builder /build/target/release/vertd ./vertd

# https://github.com/NVIDIA/nvidia-container-toolkit/issues/140#issuecomment-1927273909
RUN apt-get update && apt-get install -y \
curl \
ffmpeg \
mesa-va-drivers \
intel-media-va-driver \
Expand All @@ -37,4 +38,9 @@ RUN rm -rf \
/var/lib/apt/lists/* \
/var/tmp/*

EXPOSE 24153/tcp

HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD sh -c "curl --fail --silent --output /dev/null http://localhost:${PORT:-24153}/api/version || exit 1"

ENTRYPOINT ["./vertd"]
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
services:
vertd:
build: .
container_name: vertd
image: ghcr.io/vert-sh/vertd:latest
build: .
environment:
- PORT=${PORT:-24153}
- WEBHOOK_URL=${WEBHOOK_URL}
- WEBHOOK_PINGS=${WEBHOOK_PINGS}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- PUBLIC_URL=${PUBLIC_URL}
ports:
- "${PORT:-24153}:${PORT:-24153}"
- "${PORT:-24153}:24153"

# For AMD/Intel GPUs, uncomment the "devices" section - then remove
# or comment out the "deploy" section and the "runtime" string used
Expand Down
10 changes: 9 additions & 1 deletion docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This file covers how to get started with `vertd`.
- [Arch Linux](#arch-linux)
- [Fedora](#fedora)
- [Downloading the server binaries](#downloading-the-server-binaries)
- [Running `vertd` on Windows](#running-vertd-on-windows)
- [Running `vertd` on macOS/Linux](#running-vertd-on-macoslinux)
- [Using systemd](#using-systemd)
- [Using Docker](#using-docker)
Expand Down Expand Up @@ -78,6 +79,13 @@ Grab the latest `vertd` release for your operating system and architecture from
> [!NOTE]
> If you're using an Intel-based Mac, download the `vertd-mac-x86_64` executable. For Mac computers with Apple silicon (M1 or newer), download `vertd-mac-arm64` instead.

## Running `vertd` on Windows

Simply navigate to the directory where you downloaded the server binary, then open it like any other program.

> [!IMPORTANT]
> It's very likely you will get a SmartScreen pop-up on Windows. You can ignore it by pressing `More info` and then `Run anyway`. However, if you don't trust the file, you can always inspect and compile the code yourself.

## Running `vertd` on macOS/Linux

Assuming you downloaded the `vertd` executable to your Downloads folder, open the Terminal and run the following command to navigate there:
Expand Down Expand Up @@ -179,4 +187,4 @@ You can set the `VERTD_FORCE_GPU` environment variable with your vendor type (`n

```shell
$ VERTD_FORCE_GPU=intel ./vertd
```
```
10 changes: 8 additions & 2 deletions src/http/services/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,15 @@ pub async fn websocket(req: HttpRequest, stream: web::Payload) -> Result<HttpRes
}
drop(app_state);
log::error!("job {} failed", job_id);

let error_message = if logs.is_empty() {
"No error logs.".to_string()
} else {
logs.join("\n")
};

let message: String = Message::Error {
message: "oops -- your job failed! make sure your file is valid before trying again - maddie has been notified :)"
.to_string(),
message: error_message,
}
.into();
session.text(message).await.unwrap();
Expand Down