mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 18:19:08 +00:00
Merge pull request #244 from Utkarsh-Patel-13/fix/docker
Fixed docker config to run on non-windows architectures
This commit is contained in:
commit
db6972e976
5 changed files with 22 additions and 16 deletions
8
.github/workflows/docker_build.yaml
vendored
8
.github/workflows/docker_build.yaml
vendored
|
@ -142,6 +142,9 @@ jobs:
|
|||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
@ -163,6 +166,7 @@ jobs:
|
|||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
# Optional: Add build cache for faster builds
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
@ -185,6 +189,9 @@ jobs:
|
|||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
|
@ -206,6 +213,7 @@ jobs:
|
|||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
# Optional: Add build cache for faster builds
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
|
@ -2,19 +2,21 @@ version: '3.8'
|
|||
|
||||
services:
|
||||
frontend:
|
||||
build: ghcr.io/modsetter/surfsense_ui:latest
|
||||
image: ghcr.io/modsetter/surfsense_ui:latest
|
||||
ports:
|
||||
- "${FRONTEND_PORT:-3000}:3000"
|
||||
volumes:
|
||||
- ./surfsense_web:/app
|
||||
- /app/node_modules
|
||||
env_file:
|
||||
- ./surfsense_web/.env
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://backend:8000}
|
||||
|
||||
backend:
|
||||
build: ghcr.io/modsetter/surfsense_backend:latest
|
||||
image: ghcr.io/modsetter/surfsense_backend:latest
|
||||
ports:
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
volumes:
|
||||
|
@ -28,14 +30,5 @@ services:
|
|||
- PYTHONPATH=/app
|
||||
- UVICORN_LOOP=asyncio
|
||||
- UNSTRUCTURED_HAS_PATCHED_LOOP=1
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
||||
- LANGCHAIN_TRACING_V2=false
|
||||
- LANGSMITH_TRACING=false
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
|
|
|
@ -21,8 +21,12 @@ RUN pip install --upgrade certifi pip-system-certs
|
|||
COPY pyproject.toml .
|
||||
COPY uv.lock .
|
||||
|
||||
# Install CUDA-enabled PyTorch for WSL2 before other dependencies
|
||||
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
||||
# Install PyTorch based on architecture
|
||||
RUN if [ "$(uname -m)" = "x86_64" ]; then \
|
||||
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121; \
|
||||
else \
|
||||
pip install --no-cache-dir torch torchvision torchaudio; \
|
||||
fi
|
||||
|
||||
# Install python dependencies
|
||||
RUN pip install --no-cache-dir uv && \
|
||||
|
@ -58,4 +62,4 @@ ENV UVICORN_LOOP=asyncio
|
|||
|
||||
# Run
|
||||
EXPOSE 8000
|
||||
CMD ["python", "main.py"]
|
||||
CMD ["python", "main.py", "--reload"]
|
|
@ -50,7 +50,8 @@ export function ModernHeroWithGradients() {
|
|||
</div>
|
||||
<p className="mx-auto max-w-3xl py-6 text-center text-base text-gray-600 dark:text-neutral-300 md:text-lg lg:text-xl">
|
||||
A Customizable AI Research Agent just like NotebookLM or Perplexity, but connected to
|
||||
external sources such as Search Engines, Slack, Linear, Jira, Confluence, Notion, YouTube, GitHub, Discord and more.
|
||||
external sources such as Search Engines, Slack, Linear, Jira, Confluence, Notion,
|
||||
YouTube, GitHub, Discord and more.
|
||||
</p>
|
||||
<div className="flex flex-col items-center gap-6 py-6 sm:flex-row">
|
||||
<Link
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"description": "SurfSense Frontend",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbopack",
|
||||
"dev:turbo": "next dev --turbopack",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
|
|
Loading…
Add table
Reference in a new issue