Spaces:
Sleeping
Sleeping
asnani clinic shell · bundle 14448dd1
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
# Asnani-AI — public Space shell. Contains no application code: at build time it downloads the private bundle from the
|
| 2 |
# dataset named in BUNDLE_REPO using the HF_TOKEN build secret, then serves it behind the platform's sign-in.
|
| 3 |
FROM python:3.12-slim
|
| 4 |
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 \
|
| 6 |
-
|
| 7 |
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/* \
|
| 9 |
&& useradd -m -u 1000 asnani && mkdir -p /srv /data && chown -R asnani:asnani /srv /data
|
|
@@ -21,14 +21,14 @@ p = hf_hub_download(repo_id=os.environ["BUNDLE_REPO"], filename=os.environ["BUND
|
|
| 21 |
revision=os.environ.get("BUNDLE_REV", "main"))
|
| 22 |
with tarfile.open(p) as t:
|
| 23 |
t.extractall("/srv", filter="data")
|
| 24 |
-
print("bundle extracted:", sorted(os.listdir("/srv/asnani")))
|
| 25 |
PY
|
| 26 |
-
RUN pip install -r /srv/asnani/requirements.txt && cp -r /srv/asnani/data/. /data/ && chown -R asnani:asnani /srv /data
|
| 27 |
|
| 28 |
USER asnani
|
| 29 |
# Claude Code CLI: the AI layer signs in with the Space secret CLAUDE_CODE_OAUTH_TOKEN (from `claude setup-token`).
|
| 30 |
RUN curl -fsSL https://claude.ai/install.sh | bash && ~/.local/bin/claude --version
|
| 31 |
ENV PATH="/home/asnani/.local/bin:${PATH}" CLAUDE_BIN=/home/asnani/.local/bin/claude HOME=/home/asnani
|
| 32 |
-
WORKDIR /srv/asnani
|
| 33 |
EXPOSE 7860
|
| 34 |
CMD ["python", "server.py"]
|
|
|
|
| 1 |
+
# Asnani-AI clinic — public Space shell. Contains no application code: at build time it downloads the private bundle from the
|
| 2 |
# dataset named in BUNDLE_REPO using the HF_TOKEN build secret, then serves it behind the platform's sign-in.
|
| 3 |
FROM python:3.12-slim
|
| 4 |
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 \
|
| 6 |
+
ORTHOAI_DATA_ROOT=/data PORT=7860 BUNDLE_REPO=VoxelCoreAI/asnani-clinic-bundle BUNDLE_FILE=asnani-clinic-bundle.tar.gz
|
| 7 |
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/* \
|
| 9 |
&& useradd -m -u 1000 asnani && mkdir -p /srv /data && chown -R asnani:asnani /srv /data
|
|
|
|
| 21 |
revision=os.environ.get("BUNDLE_REV", "main"))
|
| 22 |
with tarfile.open(p) as t:
|
| 23 |
t.extractall("/srv", filter="data")
|
| 24 |
+
print("bundle extracted:", sorted(os.listdir("/srv/asnani-clinic")))
|
| 25 |
PY
|
| 26 |
+
RUN pip install -r /srv/asnani-clinic/requirements.txt && cp -r /srv/asnani-clinic/data/. /data/ && chown -R asnani:asnani /srv /data
|
| 27 |
|
| 28 |
USER asnani
|
| 29 |
# Claude Code CLI: the AI layer signs in with the Space secret CLAUDE_CODE_OAUTH_TOKEN (from `claude setup-token`).
|
| 30 |
RUN curl -fsSL https://claude.ai/install.sh | bash && ~/.local/bin/claude --version
|
| 31 |
ENV PATH="/home/asnani/.local/bin:${PATH}" CLAUDE_BIN=/home/asnani/.local/bin/claude HOME=/home/asnani
|
| 32 |
+
WORKDIR /srv/asnani-clinic
|
| 33 |
EXPOSE 7860
|
| 34 |
CMD ["python", "server.py"]
|