update previews

This commit is contained in:
Concedo
2025-09-11 19:00:26 +08:00
parent 27c443f01e
commit 4eb580d376
7 changed files with 70 additions and 182 deletions

View File

@@ -1,130 +0,0 @@
# ==============================================================================
# ARGUMENTS
# ==============================================================================
# Define the CANN base image for easier version updates later
ARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.1.rc1-910b-openeuler22.03-py3.10
# ==============================================================================
# BUILD STAGE
# Compile all binary files and libraries
# ==============================================================================
FROM ${CANN_BASE_IMAGE} AS build
# Define the Ascend chip model for compilation. Default is Ascend910B3
ARG ASCEND_SOC_TYPE=Ascend910B3
# -- Install build dependencies --
RUN yum install -y gcc g++ cmake make git libcurl-devel python3 python3-pip && \
yum clean all && \
rm -rf /var/cache/yum
# -- Set the working directory --
WORKDIR /app
# -- Copy project files --
COPY . .
# -- Set CANN environment variables (required for compilation) --
# Using ENV instead of `source` allows environment variables to persist across the entire image layer
ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest
ENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${LD_LIBRARY_PATH}
ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${PATH}
ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/opp
ENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/runtime/lib64/stub:$LD_LIBRARY_PATH
# ... You can add other environment variables from the original file as needed ...
# For brevity, only core variables are listed here. You can paste the original ENV list here.
# -- Build llama.cpp --
# Use the passed ASCEND_SOC_TYPE argument and add general build options
RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh --force \
&& \
cmake -B build \
-DGGML_CANN=ON \
-DCMAKE_BUILD_TYPE=Release \
-DSOC_TYPE=${ASCEND_SOC_TYPE} \
. && \
cmake --build build --config Release -j$(nproc)
# -- Organize build artifacts for copying in later stages --
# Create a lib directory to store all .so files
RUN mkdir -p /app/lib && \
find build -name "*.so" -exec cp {} /app/lib \;
# Create a full directory to store all executables and Python scripts
RUN mkdir -p /app/full && \
cp build/bin/* /app/full/ && \
cp *.py /app/full/ && \
cp -r gguf-py /app/full/ && \
cp -r requirements /app/full/ && \
cp requirements.txt /app/full/
# If you have a tools.sh script, make sure it is copied here
# cp .devops/tools.sh /app/full/tools.sh
# ==============================================================================
# BASE STAGE
# Create a minimal base image with CANN runtime and common libraries
# ==============================================================================
FROM ${CANN_BASE_IMAGE} AS base
# -- Install runtime dependencies --
RUN yum install -y libgomp curl && \
yum clean all && \
rm -rf /var/cache/yum
# -- Set CANN environment variables (required for runtime) --
ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest
ENV LD_LIBRARY_PATH=/app:${ASCEND_TOOLKIT_HOME}/lib64:${LD_LIBRARY_PATH}
ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${PATH}
ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/opp
# ... You can add other environment variables from the original file as needed ...
WORKDIR /app
# Copy compiled .so files from the build stage
COPY --from=build /app/lib/ /app
# ==============================================================================
# FINAL STAGES (TARGETS)
# ==============================================================================
### Target: full
# Complete image with all tools, Python bindings, and dependencies
# ==============================================================================
FROM base AS full
COPY --from=build /app/full /app
# Install Python dependencies
RUN yum install -y git python3 python3-pip && \
pip3 install --no-cache-dir --upgrade pip setuptools wheel && \
pip3 install --no-cache-dir -r requirements.txt && \
yum clean all && \
rm -rf /var/cache/yum
# You need to provide a tools.sh script as the entrypoint
ENTRYPOINT ["/app/tools.sh"]
# If there is no tools.sh, you can set the default to start the server
# ENTRYPOINT ["/app/llama-server"]
### Target: light
# Lightweight image containing only llama-cli
# ==============================================================================
FROM base AS light
COPY --from=build /app/full/llama-cli /app
ENTRYPOINT [ "/app/llama-cli" ]
### Target: server
# Dedicated server image containing only llama-server
# ==============================================================================
FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
HEALTHCHECK --interval=5m CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]

0
.gitmodules vendored
View File

View File

@@ -108,6 +108,7 @@ Current version indicated by LITEVER below.
--theme_color_tabs_text: #e0e0e0;
--theme_color_glow_text: #94d7ff;
--theme_color_placeholder_text:#9e9e9e;
--theme_color_topmenu: #32496d;
}
.theme-old {
@@ -131,6 +132,26 @@ Current version indicated by LITEVER below.
--theme_color_tabs_text: #e0e0e0;
--theme_color_glow_text: #7afaff;
--theme_color_placeholder_text:#9e9e9e;
--theme_color_topmenu: #337ab7;
}
body.connected.corpoui .topmenu {
--theme_color_topmenu: #337ab7;
}
body.connected.darkmode.corpoui .topmenu {
--theme_color_topmenu: #32496d;
}
body.connected.corpoui .nav-link {
--theme_color_topbtn: #4787be;
}
body.connected.corpoui .nav-link:hover {
--theme_color_topbtn_highlight: #4db4ea;
}
body.connected.darkmode.corpoui .nav-link {
--theme_color_topbtn: #415577;
}
body.connected.darkmode.corpoui .nav-link:hover {
--theme_color_topbtn_highlight: #596985;
}
/* Global appearances */
@@ -318,8 +339,9 @@ Current version indicated by LITEVER below.
line-height: normal;
}
body.connected .topmenu {
background-color: var(--theme_color_main);
background-color: var(--theme_color_topmenu);
}
.nav-link {
color: #f2f2f2;
font-weight: bold;
@@ -344,6 +366,7 @@ Current version indicated by LITEVER below.
background-color: var(--theme_color_topbtn_highlight);
border-color: var(--theme_color_border);
}
.navtoggler {
background-color: var(--theme_color_topbtn);
border: 0px solid #bababa;
@@ -1159,65 +1182,51 @@ Current version indicated by LITEVER below.
padding: 2px 2px;
text-wrap: wrap;
}
.scenarioitem.blue
{
background-image: var(--img_paper),linear-gradient(to right, #63aae7, #337ab7);
.scenarioitem.blue {
background-image: var(--img_paper), linear-gradient(to right, #4f6fa0, #365580);
}
.scenarioitem.blue:hover
{
background-image: var(--img_paper),linear-gradient(to right, #7ebbf0, #438ac7);
.scenarioitem.blue:hover {
background-image: var(--img_paper), linear-gradient(to right, #5f82b8, #406591);
}
.scenarioitem.blue:focus
{
background-image: var(--img_paper),linear-gradient(to right, #4c7aa3, #4c7aa3);
.scenarioitem.blue:focus {
background-image: var(--img_paper), linear-gradient(to right, #304764, #304764);
}
.scenarioitem.green
{
background-image: var(--img_sword),linear-gradient(to right, #58db6e, #2ba04e);
.scenarioitem.green {
background-image: var(--img_sword), linear-gradient(to right, #4da96d, #347a51);
}
.scenarioitem.green:hover
{
background-image: var(--img_sword),linear-gradient(to right, #68e47d, #37b85e);
.scenarioitem.green:hover {
background-image: var(--img_sword), linear-gradient(to right, #5cbf80, #3d8c5f);
}
.scenarioitem.green:focus
{
background-image: var(--img_sword),linear-gradient(to right, #53a34c, #4ca353);
.scenarioitem.green:focus {
background-image: var(--img_sword), linear-gradient(to right, #2f6042, #2f6042);
}
.scenarioitem.red
{
background-image: var(--img_chat),linear-gradient(to right, #e76363, #b73333);
.scenarioitem.red {
background-image: var(--img_chat), linear-gradient(to right, #a04d4d, #7a3535);
}
.scenarioitem.red:hover
{
background-image: var(--img_chat),linear-gradient(to right, #f07e7e, #c74343);
.scenarioitem.red:hover {
background-image: var(--img_chat), linear-gradient(to right, #b85c5c, #8c4040);
}
.scenarioitem.red:focus
{
background-image: var(--img_chat),linear-gradient(to right, #a34c4c, #a34c4c);
.scenarioitem.red:focus {
background-image: var(--img_chat), linear-gradient(to right, #5a2e2e, #5a2e2e);
}
.scenarioitem.purple
{
background-image: none,linear-gradient(to right, #dc63e7, #ac33b7);
.scenarioitem.purple {
background-image: none, linear-gradient(to right, #8d5ca6, #6b4582);
}
.scenarioitem.purple:hover
{
background-image: none,linear-gradient(to right, #f07ee6, #c743c7);
.scenarioitem.purple:hover {
background-image: none, linear-gradient(to right, #9f6ab8, #7a5091);
}
.scenarioitem.purple:focus
{
background-image: none,linear-gradient(to right, #a34c9c, #a34ca3);
.scenarioitem.purple:focus {
background-image: none, linear-gradient(to right, #50325e, #50325e);
}
.scenarioitem.yellow
{
background-image: var(--img_compass),linear-gradient(to right, #daae5d, #ad8823);
.scenarioitem.yellow {
background-image: var(--img_compass),linear-gradient(to right, #c89b4a, #9c7736);
}
.scenarioitem.yellow:hover
{
background-image: var(--img_compass),linear-gradient(to right, #e0c56e, #bba632);
.scenarioitem.yellow:hover {
background-image: var(--img_compass),linear-gradient(to right, #d6ad5c, #ad8642);
}
.scenarioitem.yellow:focus
{
background-image: var(--img_compass),linear-gradient(to right, #a38c4c, #a38c4c);
.scenarioitem.yellow:focus {
background-image: var(--img_compass),linear-gradient(to right, #6b5530, #6b5530);
}
/* Welcome splash */
@@ -2055,7 +2064,7 @@ Current version indicated by LITEVER below.
width: 100%;
}
.corpo_leftpanel_btn:hover {
background: #9dcef5;
background: #b0d9fc;
background-repeat: no-repeat;
background-position: 8px;
background-size: 24px;
@@ -20908,6 +20917,15 @@ Current version indicated by LITEVER below.
document.getElementById("gametext").contentEditable = (document.getElementById("allowediting").checked && pending_response_id=="");
let inEditMode = (document.getElementById("allowediting").checked ? true : false);
if(is_corpo_ui())
{
document.body.classList.add('corpoui');
}
else
{
document.body.classList.remove('corpoui');
}
//adventure mode has a toggle to choose action mode
document.getElementById("adventure_mode_img").classList.remove("input_story");
document.getElementById("adventure_mode_img").classList.remove("input_action");
@@ -24882,7 +24900,7 @@ Current version indicated by LITEVER below.
<div style="padding:2px;font-size:14px;margin-left:8px;font-weight:600;line-height:1.1;margin-top:12px">Quick Slot Load</div>
<hr style="margin-top:4px;margin-bottom:6px" />
<div class="corpoleftpanelitemsinner" id="corpoleftpanelitemsinner"></div>
<div style="margin-top: auto; margin-bottom:2px; width: 230px;"><div onclick="quicksave()" class="corpo_leftpanel_btn" type="button" style="width:110px;padding-left: 44px;display:inline-block;background-image: var(--img_save_mono);">Save</div><div onclick="quickdelete()" class="corpo_leftpanel_btn red" type="button" style="width:110px;padding-left: 44px;display:inline-block;background-image: var(--img_delete_mono);">Delete</div></div>
<div style="margin-top: auto; margin-bottom:2px; width: 230px;"><div onclick="quicksave()" class="corpo_leftpanel_btn" type="button" style="width:110px;padding-left: 44px;display:inline-block;background-image: var(--img_save_mono);">Save</div><div onclick="quickdelete()" class="corpo_leftpanel_btn" type="button" style="width:110px;padding-left: 44px;display:inline-block;background-image: var(--img_delete_mono);">Delete</div></div>
</div>
</div>
<button title="Show Corpo Side Panel" class="corpo_leftpanel_open mainnav" onclick="show_corpo_leftpanel(true)"><div class="corpo_arrow_right"></div></button>
@@ -26600,10 +26618,10 @@ Current version indicated by LITEVER below.
</div>
</div>
<div style="width:100%;align-self: center;">
<button type="button" id="savetoslot" title="Save To Slot" class="btn btn-primary bg_primary" onclick="save_to_curr_slot()"><img class="btnicon-save"/> Save Slot</button>
<button type="button" id="loadfromslot" title="Load From Slot" class="btn btn-primary bg_primary" onclick="load_from_curr_slot()"><img class="btnicon-load"/> Load Slot</button>
<button type="button" id="downloadslot" title="Download Slot" class="btn btn-primary bg_green" onclick="download_from_curr_slot()"><img class="btnicon-download"/> Download</button>
<button type="button" id="deleteslot" title="Delete Slot" class="btn btn-primary bg_red" onclick="delete_from_curr_slot()"><img class="btnicon-delete"/> Delete Slot</button>
<button type="button" id="savetoslot" title="Save To Slot" class="btn btn-primary" onclick="save_to_curr_slot()"><img class="btnicon-save"/> Save Slot</button>
<button type="button" id="loadfromslot" title="Load From Slot" class="btn btn-primary" onclick="load_from_curr_slot()"><img class="btnicon-load"/> Load Slot</button>
<button type="button" id="downloadslot" title="Download Slot" class="btn btn-primary" onclick="download_from_curr_slot()"><img class="btnicon-download"/> Download</button>
<button type="button" id="deleteslot" title="Delete Slot" class="btn btn-primary" onclick="delete_from_curr_slot()"><img class="btnicon-delete"/> Delete Slot</button>
</div>
</div>
<div class="menutext"><p style="padding:6px;font-size: 10px;" class="color_red">Caution: Local Storage Slots are saved to a temporary cache and can be deleted by your browser. KoboldCpp remote storage will save data to a file in your KoboldCpp server. To avoid losing data, use the download file button.</p></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB