generated from TryOS-Labs/Template-Repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (37 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# TyrOS Labs
FROM archlinux:latest
LABEL name="TryOS GenAI Container"
LABEL description="Ollama and Ollama GUI in a Arch Linux Container"
LABEL maintainer="TyrOS Labs"
LABEL version="latest"
RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm --needed base-devel git ollama nodejs-lts-hydrogen yarn pnpm
# Setup Ollama GUI
RUN git clone --depth 1 https://github.com/HelgeSverre/ollama-gui.git
WORKDIR /ollama-gui
RUN yarn install
RUN yarn build
WORKDIR /app
COPY frontend /app/frontend
WORKDIR /ollama-gui
RUN ls /ollama-gui
RUN ls /app/frontend
RUN mkdir -p /app/frontend/public/chat
RUN cp -r /ollama-gui/dist/* /app/frontend/public/chat
# Setup Ollama Settings
COPY ollama-settings /app/ollama-settings
WORKDIR /app/ollama-settings
RUN ls /app
RUN ls /app/ollama-settings
RUN pnpm install
RUN pnpm build
RUN mkdir -p /app/frontend/public/settings
RUN cp -r /app/ollama-settings/dist/* /app/frontend/public/settings
WORKDIR /app/frontend
RUN yarn install
ENV OLLAMA_HOST=0.0.0.0:11434
ENV OLLAMA_ORIGINS=*
RUN ollama serve & sleep 2 && ollama pull all-minilm
EXPOSE 11434
EXPOSE 3000
ENTRYPOINT ["sh", "-c", "ollama serve & yarn start --host 0.0.0.0"]