Skip to content

Commit 5e55df3

Browse files
Fix bundles push and simplify Docker image (#935)
* docker fixes and simplifications * v1.14.4
1 parent 5bed28d commit 5e55df3

11 files changed

Lines changed: 27 additions & 28 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.github
33
.mypy_cache
44
.neptune
5-
bundles
65
wandb
6+
llmstudio_mnt/
77
.pytest_cache
88
data
99
documentation

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ subs/
1414
/datasets/
1515
.idea/
1616
.local/
17+
llmstudio_mnt/
1718

1819
output
1920

Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,21 @@ RUN make setup && chmod -R 777 /workspace/.venv
4646
ENV PATH=/workspace/.venv/bin:$PATH
4747

4848
# We need to create a mount point for the user to mount their volume
49-
# All persistent data lives in /home/llmstudio/mount
50-
RUN mkdir -p /home/llmstudio/mount
51-
ENV H2O_LLM_STUDIO_WORKDIR=/home/llmstudio/mount
49+
# All persistent data lives in /mount
50+
# RUN mkdir -p /mount
51+
ENV H2O_LLM_STUDIO_WORKDIR=/mount
5252

5353
# Download the demo datasets and place in the /workspace/demo directory
5454
# Set the environment variable for the demo datasets
5555
ENV H2O_LLM_STUDIO_DEMO_DATASETS=/workspace/demo
5656
COPY llm_studio/download_default_datasets.py /workspace/
5757
RUN python download_default_datasets.py
5858

59-
COPY . /workspace
59+
COPY ./llm_studio /workspace/llm_studio
60+
COPY ./prompts /workspace/prompts
61+
COPY ./model_cards /workspace/model_cards
62+
COPY ./LICENSE /workspace/LICENSE
63+
COPY ./entrypoint.sh /workspace/entrypoint.sh
6064

6165
# Remove unnecessary packages remove build packages again
6266
# Prevent removal of cuda packages
@@ -67,22 +71,20 @@ RUN apt-get purge -y git curl python3.10-distutils software-properties-common \
6771

6872
USER llmstudio
6973

74+
ENV HF_HOME=/mount/huggingface
75+
ENV TRITON_CACHE_DIR=/mount/.triton/cache
76+
7077
ENV HF_HUB_DISABLE_TELEMETRY=1
7178
ENV DO_NOT_TRACK=1
7279

7380
# Set the environment variables for the wave server
7481
ENV H2O_WAVE_APP_ADDRESS=http://127.0.0.1:8756
7582
ENV H2O_WAVE_MAX_REQUEST_SIZE=25MB
7683
ENV H2O_WAVE_NO_LOG=true
77-
ENV H2O_WAVE_PRIVATE_DIR="/download/@/home/llmstudio/mount/output/download"
84+
ENV H2O_WAVE_PRIVATE_DIR="/download/@/mount/output/download"
7885

7986
USER root
8087

81-
# Make all of the files in the llmstudio directory read & writable for all users so that the
82-
# application can install other (non-persisted) new packages and other things
83-
# if it wants to. e.g. triton uses /home/llmstudio/.triton as a cache directory.
84-
RUN chmod -R 777 /home/llmstudio
85-
8688
# Make the entrypoint.sh script executable by all users
8789
RUN chmod 755 /workspace/entrypoint.sh
8890

Dockerfile.bundle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ FROM cgr.dev/chainguard/bash:latest
22

33
ARG VERSION
44

5-
COPY bundles/ai.h2o.llmstudio.${VERSION}.wave /app/ai.h2o.llmstudio.${VERSION}.wave
5+
COPY ./bundles/ai.h2o.llmstudio.${VERSION}.wave /app/ai.h2o.llmstudio.${VERSION}.wave
66
ENV WAVE_BUNDLE_FILE /app/ai.h2o.llmstudio.${VERSION}.wave

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SHELL := /bin/bash
33
UV ?= uv
44
RUN ?= $(UV) run
55
PWD = $(shell pwd)
6-
DOCKER_IMAGE ?= gcr.io/vorvan/h2oai/h2o-llmstudio:nightly
6+
DOCKER_IMAGE ?= h2oairelease/h2oai-llmstudio-app:nightly
77
APP_VERSION=$(shell sed -n 's/^version = //p' pyproject.toml | tr -d '"')
88

99
ifeq ($(origin H2O_LLM_STUDIO_WORKDIR), environment)
@@ -188,7 +188,7 @@ endif
188188
-it \
189189
-u `id -u`:`id -g` \
190190
-p 10101:10101 \
191-
-v `pwd`/llmstudio_mnt:/home/llmstudio/mount \
191+
-v `pwd`/llmstudio_mnt:/mount \
192192
$(DOCKER_IMAGE)
193193

194194
# Perform a local Trivy scan for CVEs

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ docker run \
156156
-it \
157157
-u `id -u`:`id -g` \
158158
-p 10101:10101 \
159-
-v `pwd`/llmstudio_mnt:/home/llmstudio/mount \
160-
-v ~/.cache:/home/llmstudio/.cache \
159+
-v `pwd`/llmstudio_mnt:/mount \
161160
h2oairelease/h2oai-llmstudio-app:latest
162161
```
163162

@@ -180,8 +179,7 @@ docker run \
180179
-it \
181180
-u `id -u`:`id -g` \
182181
-p 10101:10101 \
183-
-v `pwd`/llmstudio_mnt:/home/llmstudio/mount \
184-
-v ~/.cache:/home/llmstudio/.cache \
182+
-v `pwd`/llmstudio_mnt:/mount \
185183
h2o-llmstudio
186184
```
187185

app.toml.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CPUReservation = "10"
1515
MemoryReservation = "118Gi"
1616
MemoryLimit = "118Gi"
1717
GPUCount = 1
18-
VolumeMount = "/home/llmstudio/mount"
18+
VolumeMount = "/mount"
1919
VolumeSize = "1Ti"
2020
ResourceVolumeSize = "1Ti"
2121
EnableSHM = true
@@ -24,7 +24,7 @@ RoutingMode = "BASE_URL"
2424

2525
[[Env]]
2626
Name = "H2O_LLM_STUDIO_WORKDIR"
27-
Value = "/home/llmstudio/mount"
27+
Value = "/mount"
2828

2929
[[Env]]
3030
Name = "HOME"
@@ -36,7 +36,7 @@ Value = "True"
3636

3737
[[Env]]
3838
Name = "H2O_WAVE_PRIVATE_DIR"
39-
Value = "/download/@/home/llmstudio/mount/output/download"
39+
Value = "/download/@/mount/output/download"
4040

4141
[[Env]]
4242
Name = "HF_HUB_ENABLE_HF_TRANSFER"

documentation/docs/get-started/set-up-llm-studio.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ docker run \
252252
--rm \
253253
-it \
254254
-p 10101:10101 \
255-
-v `pwd`/llmstudio_mnt:/home/llmstudio/mount \
256-
-v ~/.cache:/home/llmstudio/.cache \
255+
-v `pwd`/llmstudio_mnt:/mount \
257256
h2oairelease/h2oai-llmstudio-app:latest
258257
```
259258

@@ -275,8 +274,7 @@ docker run \
275274
--rm \
276275
-it \
277276
-p 10101:10101 \
278-
-v `pwd`/llmstudio_mnt:/home/llmstudio/mount \
279-
-v ~/.cache:/home/llmstudio/.cache \
277+
-v `pwd`/llmstudio_mnt:/mount \
280278
h2o-llmstudio
281279
```
282280

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "h2o-llmstudio"
3-
version = "1.14.3"
3+
version = "1.14.4"
44
readme = "README.md"
55
license = {file = "LICENSE"}
66
requires-python = "==3.10.*"

tests/ui/llm_studio_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from hac_playwright.pages.base import BasePage
44
from playwright.sync_api import expect
55

6-
CLOUD_FILESYSTEM_PATH = "/home/llmstudio/mount/data/user/oasst"
6+
CLOUD_FILESYSTEM_PATH = "/mount/data/user/oasst"
77
LOCAL_FILESYSTEM_PATH = os.path.join(os.getcwd(), "data/user/oasst")
88

99

0 commit comments

Comments
 (0)