32 lines
920 B
Plaintext
32 lines
920 B
Plaintext
FROM ubuntu:20.04
|
|
|
|
# Avoid prompts from apt during build
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
wget \
|
|
x11vnc \
|
|
xvfb \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create the /app directory to hold the application
|
|
WORKDIR /app
|
|
|
|
# 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" && \
|
|
chmod u+x lmstudio.AppImage && \
|
|
./lmstudio.AppImage --appimage-extract && \
|
|
rm lmstudio.AppImage && \
|
|
mv squashfs-root lmstudio
|
|
|
|
# Setup a virtual display environment with XVFB
|
|
ENV DISPLAY=:99
|
|
RUN Xvfb :99 -screen 0 1024x768x16 &
|
|
EXPOSE 8080
|
|
|
|
# Run LM Studio (assumes LM Studio can be run headlessly or in a server mode)
|
|
CMD ["./lmstudio/AppRun"]
|
|
|
|
# build: docker build -t llmstudio .
|
|
# run: docker run (-dit) -p 8980:8080 llmstudio
|