lmstudio changes

This commit is contained in:
Dobromir Popov 2024-04-02 19:38:04 +03:00
parent ac00af2d86
commit 431db945dd

View File

@ -8,7 +8,11 @@ RUN apt-get update && apt-get install -y \
wget \
x11vnc \
xvfb \
&& rm -rf /var/lib/apt/lists/*
net-tools \
git \
python3 \
python3-numpy \
novnc
# Create the /app directory to hold the application
WORKDIR /app
@ -33,27 +37,37 @@ RUN apt-get update && apt-get install -y \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgtk-3-0 \
libasound2
libasound2 \
&& rm -rf /var/lib/apt/lists/*
# Setup a virtual display environment with XVFB
RUN Xvfb :99 -screen 0 1024x768x16 &
ENV DISPLAY=:99
EXPOSE 8080
# Expose port 5980 for noVNC
EXPOSE 5980
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
# Create a startup script
RUN echo '#!/bin/bash\n\
Xvfb :99 -screen 0 1024x768x16 &\n\
export DISPLAY=:99\n\
# Your application start command goes here\n\
# Start X11VNC\n\
x11vnc -display :99 -nopw -listen localhost -xkb -forever &\n\
# Start noVNC\n\
/opt/noVNC/utils/launch.sh --vnc localhost:5900 --listen 5980\n\
# Start the application\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
#? x11vnc -display :99 -nopw -listen localhost -xkb -forever &
@ -67,6 +81,7 @@ CMD ["/start-app.sh"]
# run: docker run (-dit) -p 8980:8080 llmstudio
# docker build -t llmstudio . && docker run -it -p 8980:8080 llmstudio
# cd /mnt/storage/DEV/workspace/repos/git.d-popov.com/ai-kevin/lmstudio/
# 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