File size: 1,159 Bytes
af13eea
 
 
 
 
04fa4e8
 
 
c2de92e
 
 
 
 
 
 
 
 
af13eea
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.12-slim

RUN useradd -m -u 1000 user
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Install from PyPI (gets frontend static files + all deps)
RUN pip install --no-cache-dir "embedding-atlas>=0.18.0"

# Save static files before overwriting
RUN cp -r $(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent / 'static')") /tmp/atlas-static

# Overlay our branch code
RUN pip install --no-cache-dir --force-reinstall --no-deps \
    "embedding-atlas @ git+https://github.com/davanstrien/embedding-atlas.git@dataset-url-remote#subdirectory=packages/backend"

# Restore static files
RUN cp -r /tmp/atlas-static $(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent / 'static')")

USER user
EXPOSE 7860

CMD ["embedding-atlas", \
     "--dataset-url", "https://huggingface.co/datasets/davanstrien/tinystories-atlas-data/resolve/main/dataset.parquet", \
     "--text", "text", \
     "--x", "projection_x", \
     "--y", "projection_y", \
     "--duckdb", "server", \
     "--mcp", \
     "--host", "0.0.0.0", \
     "--port", "7860"]