-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.74 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM oven/bun:latest
WORKDIR /app
# Install Python and uv
RUN apt-get update && apt-get install -y python3 python3-venv curl --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Copy package files for caching
COPY package.json bun.lock ./
COPY packages/shared/package.json ./packages/shared/
COPY packages/scraper/package.json ./packages/scraper/
COPY packages/extractor/package.json ./packages/extractor/
COPY packages/embedder/package.json ./packages/embedder/
COPY apps/cli/package.json ./apps/cli/
# Install TS dependencies (strip devDeps — biome/lefthook not needed in container)
RUN python3 -c "import json; p=json.load(open('package.json')); p.pop('devDependencies',None); json.dump(p,open('package.json','w'),indent=2)"
RUN bun install --ignore-scripts --no-frozen-lockfile
# Install Python dependencies (extractor)
COPY packages/extractor/python/pyproject.toml packages/extractor/python/uv.lock ./packages/extractor/python/
RUN cd packages/extractor/python && uv venv && \
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu --no-cache && \
uv pip install -e . --no-cache
# Install Python dependencies (classification)
COPY scripts/classification/pyproject.toml ./scripts/classification/
RUN cd scripts/classification && uv venv && \
uv pip install torch --index-url https://download.pytorch.org/whl/cpu --no-cache && \
uv pip install -e . --no-cache
# Install Python dependencies (export — uses inline script deps, uv handles it at runtime)
# Copy all source files
COPY tsconfig.base.json ./
COPY packages/ ./packages/
COPY apps/cli/ ./apps/cli/
COPY scripts/ ./scripts/
ENTRYPOINT ["tail", "-f", "/dev/null"]