Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -3,10 +3,15 @@ FROM python:3.12-slim
|
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
-
# Install from PyPI
|
| 7 |
-
RUN pip install --no-cache-dir "embedding-atlas>=0.18.0"
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
USER user
|
| 12 |
EXPOSE 7860
|
|
|
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 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
|