Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Son Of Anton
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Son Of Anton
Commits
4567dd1f
Commit
4567dd1f
authored
Mar 14, 2026
by
AGLANPC\aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AG
parent
762a009e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
Dockerfile
Dockerfile
+5
-13
warmup.py
warmup.py
+7
-0
No files found.
Dockerfile
View file @
4567dd1f
...
@@ -14,33 +14,25 @@ RUN npm run build
...
@@ -14,33 +14,25 @@ RUN npm run build
# ============================================
# ============================================
FROM
python:3.11-slim
FROM
python:3.11-slim
# Install system dependencies
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
build-essential
\
build-essential
\
&&
rm
-rf
/var/lib/apt/lists/
*
&&
rm
-rf
/var/lib/apt/lists/
*
WORKDIR
/app
WORKDIR
/app
# Install Python dependencies
COPY
requirements.txt .
COPY
requirements.txt .
RUN
pip
install
--no-cache-dir
-r
requirements.txt
RUN
pip
install
--no-cache-dir
-r
requirements.txt
# Copy backend code
COPY
backend/ ./backend/
COPY
backend/ ./backend/
# Copy built frontend
COPY
--from=frontend-build /build/frontend/dist ./frontend/dist
COPY
--from=frontend-build /build/frontend/dist ./frontend/dist
# Pre-download the ChromaDB embedding model so first request is fast
# Warm up the ChromaDB embedding model so first request is fast
RUN
python
-c
"
\
# Using a separate script file to avoid all quoting issues
import chromadb;
\
COPY
warmup.py /tmp/warmup.py
c = chromadb.Client();
\
RUN
python /tmp/warmup.py
&&
rm
/tmp/warmup.py
col = c.create_collection('_warmup');
\
col.add(documents=['warmup embedding model'], ids=['0']);
\
c.delete_collection('_warmup');
\
print('Embedding model cached.')"
# Create persistent data director
y
# Create persistent data director
ies
RUN
mkdir
-p
/data/chromadb /data/uploads
RUN
mkdir
-p
/data/chromadb /data/uploads
ENV
PYTHONUNBUFFERED=1
ENV
PYTHONUNBUFFERED=1
...
...
warmup.py
0 → 100644
View file @
4567dd1f
import
chromadb
client
=
chromadb
.
Client
()
col
=
client
.
create_collection
(
name
=
"warmup"
)
col
.
add
(
documents
=
[
"warmup embedding model"
],
ids
=
[
"id0"
])
client
.
delete_collection
(
name
=
"warmup"
)
print
(
"Embedding model cached."
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment