Spaces:
Sleeping
Sleeping
ARG BASE=node:20.18.0 | |
FROM ${BASE} AS base | |
WORKDIR /app | |
# Install dependencies | |
COPY package.json pnpm-lock.yaml ./ | |
RUN corepack enable pnpm && pnpm install | |
# Change ownership of /app to node user | |
RUN chown -R node:node /app | |
# Copy the rest of your app's source code | |
USER node | |
COPY --chown=node:node . . | |
# Expose the port the app runs on | |
EXPOSE 5173 | |
# Development image | |
FROM base AS bolt-ai-development | |
# Define environment variables for development | |
ARG GROQ_API_KEY | |
ARG HuggingFace | |
ARG OPENAI_API_KEY | |
ARG ANTHROPIC_API_KEY | |
ARG OPEN_ROUTER_API_KEY | |
ARG GOOGLE_GENERATIVE_AI_API_KEY | |
ARG OLLAMA_API_BASE_URL | |
ARG TOGETHER_API_KEY | |
ARG TOGETHER_API_BASE_URL | |
ARG VITE_LOG_LEVEL=debug | |
ARG DEFAULT_NUM_CTX | |
ENV GROQ_API_KEY=${GROQ_API_KEY} \ | |
HuggingFace_API_KEY=${HuggingFace_API_KEY} \ | |
OPENAI_API_KEY=${OPENAI_API_KEY} \ | |
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} \ | |
OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \ | |
GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \ | |
OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \ | |
TOGETHER_API_KEY=${TOGETHER_API_KEY} \ | |
TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL} \ | |
VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \ | |
DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX} | |
RUN mkdir -p ${WORKDIR}/run | |
CMD pnpm run dev --host |