Spaces:
Sleeping
Sleeping
| # Docker Space wrapper for embedding-benchmark/leaderboard-frontend. | |
| # The app code is cloned at build time so this Space tracks the requested | |
| # upstream branch without vendoring the frontend source. | |
| FROM node:24-alpine AS build | |
| ARG UPSTREAM_REPO=https://github.com/embedding-benchmark/leaderboard-frontend.git | |
| ARG UPSTREAM_BRANCH=analytics-events | |
| ARG PUBLIC_API_URL=https://mteb-leaderboard-backend.hf.space | |
| ARG PUBLIC_SITE_URL=https://smilexing-leaderboard-frontend.hf.space | |
| ARG BASE_PATH= | |
| ARG PUBLIC_ANALYTICS_ENABLED=true | |
| ARG PUBLIC_ANALYTICS_URL=https://smilexing-analytics-collector.hf.space/ | |
| ENV PUBLIC_API_URL=${PUBLIC_API_URL} \ | |
| PUBLIC_SITE_URL=${PUBLIC_SITE_URL} \ | |
| BASE_PATH=${BASE_PATH} \ | |
| CI=1\ | |
| PUBLIC_ANALYTICS_ENABLED=${PUBLIC_ANALYTICS_ENABLED}\ | |
| PUBLIC_ANALYTICS_URL=${PUBLIC_ANALYTICS_URL} | |
| WORKDIR /src | |
| RUN apk add --no-cache git ca-certificates | |
| RUN git clone --depth 1 --branch "${UPSTREAM_BRANCH}" "${UPSTREAM_REPO}" . | |
| RUN npm ci | |
| RUN npm run build | |
| FROM nginxinc/nginx-unprivileged:1.27-alpine AS runtime | |
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |
| COPY --from=build /src/build /usr/share/nginx/html | |
| COPY start.sh /app/start.sh | |
| USER root | |
| RUN chmod +x /app/start.sh | |
| USER 101 | |
| EXPOSE 7860 | |
| CMD ["/app/start.sh"] | |