-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3164 from quantified-uncertainty/dockerize-hub
First pass at dockerfile
- Loading branch information
Showing
74 changed files
with
194 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Ignore node_modules directories | ||
node_modules | ||
**/node_modules | ||
|
||
# Ignore .cache directories | ||
**/.cache | ||
|
||
# Ignore .DS_Store files | ||
**/.DS_Store | ||
|
||
# Ignore .sync.ffs_db directories | ||
**/.sync.ffs_db | ||
|
||
# Ignore .direnv directories | ||
**/.direnv | ||
|
||
# Ignore .log files | ||
**/*.log | ||
|
||
# Ignore .turbo directories | ||
**/.turbo | ||
.turbo | ||
|
||
# Ignore dist directories | ||
**/dist | ||
|
||
# Ignore .next directories | ||
**/.next | ||
|
||
# Ignore specific .vscode files | ||
.vscode/_.code-workspace | ||
.vscode/settings.json | ||
|
||
*.tsbuildinfo | ||
|
||
# Ignore .env files | ||
.env | ||
.env.test | ||
|
||
# Ignore tsconfig.tsbuildinfo file in the current directory | ||
/tsconfig.tsbuildinfo | ||
|
||
# Ignore .next directory in the current directory | ||
/.next | ||
|
||
# Ignore .vscode directory in the current directory | ||
/.vscode | ||
|
||
/.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"buildCommand": "PLATFORM=vercel npx turbo build", | ||
"buildCommand": "PLATFORM=vercel npx turbo build:storybook", | ||
"outputDirectory": "storybook-static", | ||
"ignoreCommand": "npx turbo-ignore || ../../skip-dependabot.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Should be invoked from monorepo's root. | ||
|
||
# Use the official Node.js 20 image as the base | ||
ARG DOCKER_NODE_VERSION=20-bookworm-slim | ||
|
||
FROM node:$DOCKER_NODE_VERSION AS node-with-openssl | ||
|
||
# Install OpenSSL - necessary for Prisma client | ||
# Mount caches via https://stackoverflow.com/a/72851168 | ||
RUN --mount=type=cache,id=apt-lists,target=/var/lib/apt/lists,sharing=locked \ | ||
--mount=type=cache,id=apt-cache,target=/var/cache/apt,sharing=locked \ | ||
rm -f /etc/apt/apt.conf.d/docker-clean \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
openssl | ||
# If we ever need canvas for components, uncomment these: | ||
# build-essential \ | ||
# libcairo2-dev \ | ||
# libpango1.0-dev \ | ||
# libjpeg-dev \ | ||
# libgif-dev \ | ||
# librsvg2-dev | ||
|
||
# Build | ||
FROM node-with-openssl AS build-stage | ||
WORKDIR /build | ||
|
||
# Install pnpm and turbo globally | ||
RUN npm install -g pnpm | ||
|
||
# Copy the entire monorepo to the working directory | ||
COPY . . | ||
|
||
# Install monorepo dependencies | ||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store/v3 pnpm install --frozen-lockfile | ||
|
||
WORKDIR /build/packages/hub | ||
ENV NODE_ENV=production | ||
|
||
# TODO - turbo cache, either as volume or remote | ||
RUN npx turbo run bundle --concurrency=1 | ||
|
||
FROM node-with-openssl AS run-stage | ||
WORKDIR /app | ||
|
||
COPY --from=build-stage /build/packages/hub/dist /app/dist | ||
COPY --from=build-stage /build/node_modules/.pnpm/@prisma+client*/node_modules/.prisma/client/*.so.node /app/dist | ||
|
||
CMD ["node", "dist/bundle/buildRecentModelRevision.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...gle-lang/__tests__/dist/Bandwidth_test.ts → ...le-lang/__tests__/dists/Bandwidth_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...iggle-lang/__tests__/dist/Dotwise_test.ts → ...ggle-lang/__tests__/dists/Dotwise_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...e-lang/__tests__/dist/GenericDist_test.ts → ...-lang/__tests__/dists/GenericDist_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uiggle-lang/__tests__/dist/LogKde_Test.ts → ...iggle-lang/__tests__/dists/LogKde_Test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...iggle-lang/__tests__/dist/Mixture_test.ts → ...ggle-lang/__tests__/dists/Mixture_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...quiggle-lang/__tests__/dist/Scale_test.ts → ...uiggle-lang/__tests__/dists/Scale_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...tests__/dist/Scoring/KlDivergence_test.ts → ...ests__/dists/Scoring/KlDivergence_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s__/dist/Scoring/WithScalarAnswer_test.ts → ...__/dists/Scoring/WithScalarAnswer_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ggle-lang/__tests__/dist/Symbolic_test.ts → ...gle-lang/__tests__/dists/Symbolic_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.