davanstrien HF Staff commited on
Commit
c2de92e
·
verified ·
1 Parent(s): 04fa4e8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -6,12 +6,15 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
  # Install from PyPI (gets frontend static files + all deps)
7
  RUN pip install --no-cache-dir "embedding-atlas>=0.18.0"
8
 
9
- # Save the static files location, then overlay our branch code
10
- RUN STATIC_DIR=$(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent / 'static')") && \
11
- pip install --no-cache-dir --force-reinstall --no-deps \
12
- "embedding-atlas @ git+https://github.com/davanstrien/embedding-atlas.git@dataset-url-remote#subdirectory=packages/backend" && \
13
- NEW_PKG=$(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent)") && \
14
- cp -r "$STATIC_DIR" "$NEW_PKG/static"
 
 
 
15
 
16
  USER user
17
  EXPOSE 7860
 
6
  # Install from PyPI (gets frontend static files + all deps)
7
  RUN pip install --no-cache-dir "embedding-atlas>=0.18.0"
8
 
9
+ # Save static files before overwriting
10
+ RUN cp -r $(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent / 'static')") /tmp/atlas-static
11
+
12
+ # Overlay our branch code
13
+ RUN pip install --no-cache-dir --force-reinstall --no-deps \
14
+ "embedding-atlas @ git+https://github.com/davanstrien/embedding-atlas.git@dataset-url-remote#subdirectory=packages/backend"
15
+
16
+ # Restore static files
17
+ RUN cp -r /tmp/atlas-static $(python -c "import embedding_atlas, pathlib; print(pathlib.Path(embedding_atlas.__file__).parent / 'static')")
18
 
19
  USER user
20
  EXPOSE 7860