lmstudio is running
This commit is contained in:
parent
e32aee98c0
commit
ac00af2d86
@ -1,3 +1,4 @@
|
|||||||
|
#FROM ollama/ollama
|
||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
# Avoid prompts from apt during build
|
# Avoid prompts from apt during build
|
||||||
@ -12,6 +13,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Create the /app directory to hold the application
|
# Create the /app directory to hold the application
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
# https://medium.com/@renswunnink/why-i-love-appimage-for-linux-distros-924769510ec5
|
# https://medium.com/@renswunnink/why-i-love-appimage-for-linux-distros-924769510ec5
|
||||||
RUN wget -O lmstudio.AppImage "https://releases.lmstudio.ai/linux/0.2.18/beta/LM_Studio-0.2.18.AppImage" && \
|
RUN wget -O lmstudio.AppImage "https://releases.lmstudio.ai/linux/0.2.18/beta/LM_Studio-0.2.18.AppImage" && \
|
||||||
chmod u+x lmstudio.AppImage && \
|
chmod u+x lmstudio.AppImage && \
|
||||||
@ -19,13 +21,52 @@ RUN wget -O lmstudio.AppImage "https://releases.lmstudio.ai/linux/0.2.18/beta/LM
|
|||||||
rm lmstudio.AppImage && \
|
rm lmstudio.AppImage && \
|
||||||
mv squashfs-root lmstudio
|
mv squashfs-root lmstudio
|
||||||
|
|
||||||
|
# or adddependencies on another layer
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
dbus pciutils \
|
||||||
|
libglib2.0-0 \
|
||||||
|
libnss3 \
|
||||||
|
libgbm1 \
|
||||||
|
libxshmfence1 \
|
||||||
|
libgl1-mesa-glx \
|
||||||
|
libegl1-mesa \
|
||||||
|
libatk1.0-0 \
|
||||||
|
libatk-bridge2.0-0 \
|
||||||
|
libgtk-3-0 \
|
||||||
|
libasound2
|
||||||
|
|
||||||
# Setup a virtual display environment with XVFB
|
# Setup a virtual display environment with XVFB
|
||||||
ENV DISPLAY=:99
|
|
||||||
RUN Xvfb :99 -screen 0 1024x768x16 &
|
RUN Xvfb :99 -screen 0 1024x768x16 &
|
||||||
|
ENV DISPLAY=:99
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
RUN ln -s /app/lmstudio/lm-studio /lm-studio
|
||||||
|
|
||||||
|
#? RUN chmod +x /app/lmstudio/AppRun
|
||||||
|
# Create a startup script to run Xvfb and your application
|
||||||
|
RUN echo '#!/bin/bash\n\
|
||||||
|
Xvfb :99 -screen 0 1024x768x16 &\n\
|
||||||
|
export DISPLAY=:99\n\
|
||||||
|
# Your application start command goes here\n\
|
||||||
|
exec /app/lmstudio/AppRun --no-sandbox\n\
|
||||||
|
' > /start-app.sh && chmod +x /start-app.sh
|
||||||
|
CMD ["/start-app.sh"]
|
||||||
|
|
||||||
|
#> apt-get update && apt-get install -y git x11vnc
|
||||||
|
#> git clone https://github.com/novnc/noVNC.git /opt/noVNC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Run LM Studio (assumes LM Studio can be run headlessly or in a server mode)
|
# Run LM Studio (assumes LM Studio can be run headlessly or in a server mode)
|
||||||
CMD ["./lmstudio/AppRun"]
|
#CMD ["./lmstudio/AppRun"]
|
||||||
|
#CMD ["./lmstudio/AppRun", "--no-sandbox"]
|
||||||
|
#CMD ["/bin/bash"] # interactive shell
|
||||||
|
|
||||||
|
|
||||||
# build: docker build -t llmstudio .
|
# build: docker build -t llmstudio .
|
||||||
# run: docker run (-dit) -p 8980:8080 llmstudio
|
# run: docker run (-dit) -p 8980:8080 llmstudio
|
||||||
|
# docker build -t llmstudio . && docker run -it -p 8980:8080 llmstudio
|
||||||
|
|
||||||
|
# docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -it llmstudio
|
||||||
|
# docker build -t llmstudio . && docker run -dit -p 8980:8080 --volume /var/run/dbus:/var/run/dbus llmstudio
|
||||||
|
# docker build -t llmstudio . && docker run -it -p 8980:8080 --volume /var/run/dbus:/var/run/dbus --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --security-opt apparmor=unconfined llmstudio
|
||||||
|
Loading…
x
Reference in New Issue
Block a user