Skip to content

Commit

Permalink
chore(sys): switch to using debian instead of alpine due to incompati…
Browse files Browse the repository at this point in the history
…bility for running onnx models
  • Loading branch information
sneko committed Mar 27, 2024
1 parent 9da70dd commit 10dc704
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
35 changes: 11 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
# The `APP_HOST` variable defaults onto what Next.js server uses in a Docker environment

ARG NODE_VERSION=18.19.0
ARG RUBY_VERSION=3.2.2-r1
ARG PIP_VERSION=23.3.1-r0
ARG RUBY_VERSION=1:3.1
ARG PIP_VERSION=23.0.1+dfsg-1
ARG PRISMA_VERSION=4.16.2
ARG APP_HOST=172.17.0.2
ARG PORT=3000

# Note: the pandoc package version naming is completely different than the official repository so as of now
# we are not specifying a fixed version (ref: https://pkgs.alpinelinux.org/package/edge/community/x86_64/pandoc-cli)

FROM node:${NODE_VERSION}-alpine
FROM node:${NODE_VERSION}-slim

ARG RUBY_VERSION
ARG PIP_VERSION
Expand All @@ -21,27 +18,17 @@ ARG PORT

USER root

RUN apk add \
# This is for the code we manage
"build-base" \
"libffi-dev" \
"libcurl" \
# Install necessary dependencies
RUN apt-get update && apt-get install -y \
"chromium" \
"curl" \
"git" \
"pandoc-cli" \
"pandoc" \
"python3-pip=${PIP_VERSION}" \
"ruby-dev=${RUBY_VERSION}" \
"py3-pip=${PIP_VERSION}" \
# This is the dependencies needed by chromium
"chromium" \
"libstdc++" \
"harfbuzz" \
"nss" \
"freetype" \
"ttf-freefont" \
"font-noto-emoji" \
"wqy-zenhei"

ENV CHROME_BIN="/usr/bin/chromium-browser"
&& rm -rf /var/lib/apt/lists/*

ENV CHROME_BIN="/usr/bin/chromium"
ENV CHROME_PATH="/usr/lib/chromium/"

ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH="${CHROME_BIN}"
Expand Down
2 changes: 1 addition & 1 deletion src/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
binaryTargets = ["native", "debian-openssl-1.1.x"]
previewFeatures = ["fullTextSearch", "views"]
}

Expand Down

0 comments on commit 10dc704

Please sign in to comment.