feat: vtracer implemented and added docker file binaries install

This commit is contained in:
Sahil
2025-08-12 22:26:39 +05:30
parent e78de6f6de
commit 76c840dbaa
2 changed files with 19 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ RUN bun run build
# copy production dependencies and source code into final image
FROM base AS release
# install additional dependencies
# install additional dependencies
RUN apt-get update && apt-get install -y \
assimp-utils \
calibre \
@@ -75,15 +75,30 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install VTracer binary (corrected version using tar.gz)
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "aarch64" ]; then \
VTRACER_ASSET="vtracer-aarch64-unknown-linux-musl.tar.gz"; \
else \
VTRACER_ASSET="vtracer-x86_64-unknown-linux-musl.tar.gz"; \
fi && \
echo "Downloading VTracer: $VTRACER_ASSET" && \
curl -L -o /tmp/vtracer.tar.gz "https://github.com/visioncortex/vtracer/releases/download/0.6.4/${VTRACER_ASSET}" && \
tar -xzf /tmp/vtracer.tar.gz -C /tmp/ && \
mv /tmp/vtracer /usr/local/bin/vtracer && \
chmod +x /usr/local/bin/vtracer && \
rm /tmp/vtracer.tar.gz && \
echo "VTracer installed successfully" && \
vtracer --help
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /app/public/generated.css /app/public/
COPY --from=prerelease /app/dist /app/dist
# COPY . .
RUN mkdir data
EXPOSE 3000/tcp
# used for calibre
ENV QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox"
ENV NODE_ENV=production
ENTRYPOINT [ "bun", "run", "dist/src/index.js" ]

View File

@@ -72,7 +72,7 @@ export function convert(
execFile("vtracer", args, (error, stdout, stderr) => {
if (error) {
reject(`error: ${error}`);
reject(`error: ${error}${stderr ? `\nstderr: ${stderr}` : ''}`);
return;
}