CREATORJD commited on
Commit
bddbbfb
·
verified ·
1 Parent(s): b662407

Use Pages service gateway and slim runtime image

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. README.md +11 -0
Dockerfile CHANGED
@@ -37,7 +37,8 @@ COPY requirements.txt /tmp/cloud-core-requirements.txt
37
  RUN pip install --no-cache-dir -r /tmp/cloud-core-requirements.txt
38
  COPY --from=source /opt/alpecca /opt/alpecca
39
  COPY --chown=1000:1000 app.py cloud_entrypoint.py start.sh /opt/hf-cloud-core/
40
- RUN sed -i 's/\r$//' /opt/hf-cloud-core/start.sh \
 
41
  && chmod 0555 /opt/hf-cloud-core/start.sh
42
 
43
  WORKDIR /opt/alpecca
 
37
  RUN pip install --no-cache-dir -r /tmp/cloud-core-requirements.txt
38
  COPY --from=source /opt/alpecca /opt/alpecca
39
  COPY --chown=1000:1000 app.py cloud_entrypoint.py start.sh /opt/hf-cloud-core/
40
+ RUN rm -rf /opt/alpecca/.git /opt/alpecca/deploy /opt/alpecca/docs /opt/alpecca/scripts \
41
+ && sed -i 's/\r$//' /opt/hf-cloud-core/start.sh \
42
  && chmod 0555 /opt/hf-cloud-core/start.sh
43
 
44
  WORKDIR /opt/alpecca
README.md CHANGED
@@ -78,6 +78,17 @@ Required Space variables:
78
  - `ALPECCA_CLOUD_AUTO_FAILOVER=1` to authorize unattended promotion after an
79
  authenticated Vault restore; omit it to require one-use approval instead
80
 
 
 
 
 
 
 
 
 
 
 
 
81
  Hugging Face supplies `SPACE_HOST` and `SPACE_ID`. `SPACE_HOST` becomes the
82
  published HTTPS origin. `ALPECCA_PUBLIC_URL` and
83
  `ALPECCA_CONTINUITY_NODE_ID` are optional explicit overrides. Secrets must stay
 
78
  - `ALPECCA_CLOUD_AUTO_FAILOVER=1` to authorize unattended promotion after an
79
  authenticated Vault restore; omit it to require one-use approval instead
80
 
81
+ The deployed Space uses the service-binding gateway rather than direct
82
+ `workers.dev` URLs because Hugging Face blocks that DNS suffix in Space
83
+ containers. Configure:
84
+
85
+ - `ALPECCA_CONTINUITY_LEASE_URL=https://alpecca-continuity-gateway.pages.dev/lease`
86
+ - `ALPECCA_MINDSCAPE_VAULT_URL=https://alpecca-continuity-gateway.pages.dev/vault`
87
+
88
+ Those prefixes forward to the existing Workers without copying continuity
89
+ state. The final Docker image also removes repository deployment scripts,
90
+ documentation, and `.git`; the survival container retains runtime source only.
91
+
92
  Hugging Face supplies `SPACE_HOST` and `SPACE_ID`. `SPACE_HOST` becomes the
93
  published HTTPS origin. `ALPECCA_PUBLIC_URL` and
94
  `ALPECCA_CONTINUITY_NODE_ID` are optional explicit overrides. Secrets must stay