gpt-engineer-app[bot] commited on
Commit
ec02791
·
2 Parent(s): 29d1cf54238089

Fixed Ollama /bin/sh entrypoint

Browse files

X-Lovable-Edit-ID: edt-19270ef2-ba03-4d0b-982f-1286033e899c

Files changed (3) hide show
  1. Dockerfile +20 -0
  2. requirements.txt +5 -0
  3. src/routeTree.gen.ts +0 -9
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ollama/ollama:latest
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ python3 \
5
+ python3-pip \
6
+ curl \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ WORKDIR /app
10
+
11
+ COPY requirements.txt ./
12
+ RUN pip3 install --no-cache-dir -r requirements.txt
13
+
14
+ COPY backend.py ./
15
+
16
+ ENV OLLAMA_HOST=0.0.0.0:11434
17
+ EXPOSE 7860 11434
18
+
19
+ ENTRYPOINT ["/bin/sh", "-lc"]
20
+ CMD ["ollama serve >/tmp/ollama.log 2>&1 & until curl -sf http://127.0.0.1:11434/api/tags >/dev/null; do sleep 2; done; ollama pull qwen3 && uvicorn backend:app --host 0.0.0.0 --port 7860"]
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn
3
+ pydantic
4
+ langchain
5
+ langchain-ollama
src/routeTree.gen.ts CHANGED
@@ -237,12 +237,3 @@ const rootRouteChildren: RootRouteChildren = {
237
  export const routeTree = rootRouteImport
238
  ._addFileChildren(rootRouteChildren)
239
  ._addFileTypes<FileRouteTypes>()
240
-
241
- import type { getRouter } from './router.tsx'
242
- import type { createStart } from '@tanstack/react-start'
243
- declare module '@tanstack/react-start' {
244
- interface Register {
245
- ssr: true
246
- router: Awaited<ReturnType<typeof getRouter>>
247
- }
248
- }
 
237
  export const routeTree = rootRouteImport
238
  ._addFileChildren(rootRouteChildren)
239
  ._addFileTypes<FileRouteTypes>()