Dataset Viewer
Auto-converted to Parquet Duplicate
index
int64
0
0
repo_id
stringclasses
351 values
file_path
stringlengths
26
186
content
stringlengths
1
990k
0
hf_public_repos
hf_public_repos/chat-ui/Dockerfile
# syntax=docker/dockerfile:1 ARG INCLUDE_DB=false FROM node:20-slim AS base ENV PLAYWRIGHT_SKIP_BROWSER_GC=1 # install dotenv-cli RUN npm install -g dotenv-cli # switch to a user that works for spaces RUN userdel -r node RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR /app # add a .env.local if the user doesn't bind a volume to it RUN touch /app/.env.local RUN npm i --no-package-lock --no-save playwright@1.47.0 USER root RUN apt-get update RUN apt-get install gnupg curl -y RUN npx playwright install --with-deps chromium RUN chown -R 1000:1000 /home/user/.npm USER user COPY --chown=1000 .env /app/.env COPY --chown=1000 entrypoint.sh /app/entrypoint.sh COPY --chown=1000 gcp-*.json /app/ COPY --chown=1000 package.json /app/package.json COPY --chown=1000 package-lock.json /app/package-lock.json RUN chmod +x /app/entrypoint.sh FROM node:20 AS builder WORKDIR /app COPY --link --chown=1000 package-lock.json package.json ./ ARG APP_BASE= ARG PUBLIC_APP_COLOR=blue ENV BODY_SIZE_LIMIT=15728640 RUN --mount=type=cache,target=/app/.npm \ npm set cache /app/.npm && \ npm ci COPY --link --chown=1000 . . RUN git config --global --add safe.directory /app && \ npm run build # mongo image FROM mongo:7 AS mongo # image to be used if INCLUDE_DB is false FROM base AS local_db_false # image to be used if INCLUDE_DB is true FROM base AS local_db_true # copy mongo from the other stage COPY --from=mongo /usr/bin/mongo* /usr/bin/ ENV MONGODB_URL=mongodb://localhost:27017 USER root RUN mkdir -p /data/db RUN chown -R 1000:1000 /data/db USER user # final image FROM local_db_${INCLUDE_DB} AS final # build arg to determine if the database should be included ARG INCLUDE_DB=false ENV INCLUDE_DB=${INCLUDE_DB} # svelte requires APP_BASE at build time so it must be passed as a build arg ARG APP_BASE= # tailwind requires the primary theme to be known at build time so it must be passed as a build arg ARG PUBLIC_APP_COLOR=blue ARG PUBLIC_COMMIT_SHA= ENV PUBLIC_COMMIT_SHA=${PUBLIC_COMMIT_SHA} ENV BODY_SIZE_LIMIT=15728640 #import the build & dependencies COPY --from=builder --chown=1000 /app/build /app/build COPY --from=builder --chown=1000 /app/node_modules /app/node_modules CMD ["/bin/bash", "-c", "/app/entrypoint.sh"]
0
hf_public_repos
hf_public_repos/chat-ui/.dockerignore
Dockerfile .vscode/ .idea .gitignore LICENSE README.md node_modules/ .svelte-kit/ .env* !.env .env.local
0
hf_public_repos
hf_public_repos/chat-ui/tailwind.config.cjs
const defaultTheme = require("tailwindcss/defaultTheme"); const colors = require("tailwindcss/colors"); /** @type {import('tailwindcss').Config} */ export default { darkMode: "class", mode: "jit", content: ["./src/**/*.{html,js,svelte,ts}"], theme: { extend: { colors: { primary: colors[process.env.PUBLIC_APP_COLOR], }, fontSize: { xxs: "0.625rem", smd: "0.94rem", }, }, }, plugins: [ require("tailwind-scrollbar")({ nocompatible: true }), require("@tailwindcss/typography"), ], };
0
hf_public_repos
hf_public_repos/chat-ui/svelte.config.js
import adapter from "@sveltejs/adapter-node"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import dotenv from "dotenv"; import { execSync } from "child_process"; dotenv.config({ path: "./.env.local" }); dotenv.config({ path: "./.env" }); function getCurrentCommitSHA() { try { return execSync("git rev-parse HEAD").toString(); } catch (error) { console.error("Error getting current commit SHA:", error); return "unknown"; } } process.env.PUBLIC_VERSION ??= process.env.npm_package_version; process.env.PUBLIC_COMMIT_SHA ??= getCurrentCommitSHA(); /** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors preprocess: vitePreprocess(), kit: { adapter: adapter(), paths: { base: process.env.APP_BASE || "", relative: false, }, csrf: { // handled in hooks.server.ts, because we can have multiple valid origins checkOrigin: false, }, csp: { directives: { ...(process.env.ALLOW_IFRAME === "true" ? {} : { "frame-ancestors": ["'none'"] }), }, }, }, }; export default config;
0
hf_public_repos
hf_public_repos/chat-ui/package-lock.json
"{\n\t\"name\": \"chat-ui\",\n\t\"version\": \"0.9.4\",\n\t\"lockfileVersion\": 3,\n\t\"requires\": (...TRUNCATED)
0
hf_public_repos
hf_public_repos/chat-ui/tsconfig.json
"{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"allowJs\": true(...TRUNCATED)
0
hf_public_repos
hf_public_repos/chat-ui/LICENSE
"Copyright 2018- The Hugging Face team. All rights reserved.\n\n Apa(...TRUNCATED)
0
hf_public_repos
hf_public_repos/chat-ui/PRIVACY.md
"## Privacy\n\n> Last updated: April 15, 2024\n\nUsers of HuggingChat are authenticated through thei(...TRUNCATED)
0
hf_public_repos
hf_public_repos/chat-ui/.npmrc
engine-strict=true
0
hf_public_repos
hf_public_repos/chat-ui/.eslintignore
".DS_Store\nnode_modules\n/build\n/.svelte-kit\n/package\n.env\n.env.*\n!.env.example\n\n# Ignore fi(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
2