-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
123 lines (117 loc) · 2.9 KB
/
Copy pathDockerfile
File metadata and controls
123 lines (117 loc) · 2.9 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM ghcr.io/linuxserver/baseimage-selkies:arch
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
# title
ENV TITLE="LM Studio" \
PIXELFLUX_WAYLAND=true
RUN \
echo "**** add icon ****" && \
curl -o \
/usr/share/selkies/www/icon.png \
https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/lmstudio-logo.png && \
echo "**** install packages ****" && \
pacman -Sy --noconfirm --needed \
ansible \
argon2 \
aurorae \
cargo \
chromium \
cmake \
code \
cuda \
discover \
dolphin \
git \
kate \
kde-cli-tools \
kdialog \
konsole \
kvantum \
kwin-x11 \
mariadb \
nano \
nodejs \
npm \
opentofu \
packagekit \
papirus-icon-theme \
pipewire \
plasma-desktop \
plasma-x11-session \
python-virtualenv \
rsync \
tmux \
typescript \
vim \
vulkan-headers \
wireplumber \
xdg-desktop-portal \
xdg-desktop-portal-kde \
xdg-user-dirs \
xorg-xhost && \
cargo install \
wl-clipboard-rs-tools && \
echo "**** install lm studio ****" && \
cd /tmp && \
mkdir /opt/lm-studio && \
curl -o \
/tmp/lm.app -L \
"https://lmstudio.ai/download/latest/linux/x64?format=AppImage" && \
chmod +x /tmp/lm.app && \
./lm.app --appimage-extract && \
mv squashfs-root/* /opt/lm-studio/ && \
curl -fsSL https://lmstudio.ai/install.sh | HOME=/opt/lm-studio bash && \
chmod -R o+rX /opt/lm-studio && \
cp \
/opt/lm-studio/usr/share/icons/hicolor/512x512/apps/lm-studio.png \
/usr/share/icons/hicolor/512x512/apps/lm-studio.png && \
sed -i \
's#^Exec=.*#Exec=/usr/bin/lm-studio#g' \
/opt/lm-studio/ai.elementlabs.lmstudio.desktop && \
cp \
/opt/lm-studio/ai.elementlabs.lmstudio.desktop \
/usr/share/applications/lm-studio.desktop && \
echo "**** install npm AI tools ****" && \
npm install -g \
--allow-scripts=opencode-ai \
@lmstudio/sdk \
cline \
openclaw@latest \
opencode-ai \
opencode-lmstudio && \
echo "**** install pip AI tools ****" && \
python -m pip install \
aider-install \
lmstudio && \
echo "**** replace wl-clipboard with rust ****" && \
mv \
/config/.cargo/bin/wl-* \
/usr/bin/ && \
echo "**** application tweaks ****" && \
mv \
/usr/bin/chromium \
/usr/bin/chromium-real && \
mv \
/usr/bin/code-oss \
/usr/bin/code-oss-real && \
setcap -r \
/usr/sbin/kwin_wayland && \
echo "**** cleanup ****" && \
rm -rf \
/config/.cache \
/config/.cargo \
/config/.config \
/config/.npm \
/config/.openclaw \
/tmp/* \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*
# add local files
COPY /root /
COPY --from=ghcr.io/linuxserver/selkies-layers:amd64-arch-kwin / /
# ports and volumes
EXPOSE 3001
VOLUME /config