| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| FROM node:20-alpine AS frontend |
|
|
| WORKDIR /build |
| COPY frontend/package.json frontend/package-lock.json* ./ |
| RUN npm install --no-audit --no-fund 2>/dev/null |
|
|
| COPY frontend/ ./ |
| ENV VITE_API_URL="" |
| RUN npm run build && ls -la dist/ |
|
|
| |
| FROM python:3.11-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| curl ca-certificates procps zstd \ |
| && rm -rf /var/lib/apt/lists/* \ |
| && curl -fsSL https://ollama.com/install.sh | sh |
|
|
| |
| RUN useradd -m -u 1000 hpuser && \ |
| mkdir -p /app /tmp/ollama /tmp/homepilot/data \ |
| /tmp/homepilot/uploads /tmp/homepilot/outputs && \ |
| chown -R hpuser:hpuser /app /tmp/ollama /tmp/homepilot |
|
|
| WORKDIR /app |
|
|
| |
| COPY backend/requirements.txt ./requirements.txt |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY backend/app ./app |
| |
| RUN touch ./app/__init__.py |
|
|
| |
| COPY community/sample ./community/sample |
|
|
| |
| COPY deploy/huggingface-space/chata-personas ./chata-personas |
|
|
| |
| COPY --from=frontend /build/dist ./frontend |
|
|
| |
| COPY deploy/huggingface-space/hf_wrapper.py ./hf_wrapper.py |
| COPY deploy/huggingface-space/auto_import_personas.py ./auto_import_personas.py |
| COPY deploy/huggingface-space/chata_project_bootstrap.py ./chata_project_bootstrap.py |
|
|
| |
| COPY start.sh ./start.sh |
| RUN chmod +x start.sh |
|
|
| USER hpuser |
| EXPOSE 7860 |
|
|
| HEALTHCHECK --interval=30s --timeout=5s --start-period=90s --retries=3 \ |
| CMD curl -fsS http://127.0.0.1:7860/health || exit 1 |
|
|
| CMD ["./start.sh"] |
|
|