Fixed docker config to run on non-windows architectures

This commit is contained in:
Utkarsh-Patel-13 2025-08-01 10:34:01 -07:00
parent f105dd3628
commit 0926e1f393
4 changed files with 18 additions and 16 deletions

View file

@ -2,19 +2,25 @@ version: '3.8'
services: services:
frontend: frontend:
build: ghcr.io/modsetter/surfsense_ui:latest build:
context: ./surfsense_web
dockerfile: Dockerfile
ports: ports:
- "${FRONTEND_PORT:-3000}:3000" - "${FRONTEND_PORT:-3000}:3000"
volumes: volumes:
- ./surfsense_web:/app - ./surfsense_web:/app
- /app/node_modules - /app/node_modules
env_file:
- ./surfsense_web/.env
depends_on: depends_on:
- backend - backend
environment: environment:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://backend:8000} - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://backend:8000}
backend: backend:
build: ghcr.io/modsetter/surfsense_backend:latest build:
context: ./surfsense_backend
dockerfile: Dockerfile
ports: ports:
- "${BACKEND_PORT:-8000}:8000" - "${BACKEND_PORT:-8000}:8000"
volumes: volumes:
@ -28,14 +34,5 @@ services:
- PYTHONPATH=/app - PYTHONPATH=/app
- UVICORN_LOOP=asyncio - UVICORN_LOOP=asyncio
- UNSTRUCTURED_HAS_PATCHED_LOOP=1 - UNSTRUCTURED_HAS_PATCHED_LOOP=1
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- LANGCHAIN_TRACING_V2=false - LANGCHAIN_TRACING_V2=false
- LANGSMITH_TRACING=false - LANGSMITH_TRACING=false
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

View file

@ -21,8 +21,12 @@ RUN pip install --upgrade certifi pip-system-certs
COPY pyproject.toml . COPY pyproject.toml .
COPY uv.lock . COPY uv.lock .
# Install CUDA-enabled PyTorch for WSL2 before other dependencies # Install PyTorch based on architecture
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 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 # Install python dependencies
RUN pip install --no-cache-dir uv && \ RUN pip install --no-cache-dir uv && \
@ -58,4 +62,4 @@ ENV UVICORN_LOOP=asyncio
# Run # Run
EXPOSE 8000 EXPOSE 8000
CMD ["python", "main.py"] CMD ["python", "main.py", "--reload"]

View file

@ -50,7 +50,8 @@ export function ModernHeroWithGradients() {
</div> </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"> <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 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> </p>
<div className="flex flex-col items-center gap-6 py-6 sm:flex-row"> <div className="flex flex-col items-center gap-6 py-6 sm:flex-row">
<Link <Link

View file

@ -4,7 +4,7 @@
"private": true, "private": true,
"description": "SurfSense Frontend", "description": "SurfSense Frontend",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev --turbopack",
"dev:turbo": "next dev --turbopack", "dev:turbo": "next dev --turbopack",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",