lvwerra HF Staff commited on
Commit
559b220
·
verified ·
1 Parent(s): 8436c6e

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -2
  2. supervisord.conf +1 -1
Dockerfile CHANGED
@@ -1,5 +1,10 @@
1
  FROM docker.io/matrixconduit/matrix-conduit:latest AS conduit
2
 
 
 
 
 
 
3
  FROM python:3.11-slim
4
 
5
  # Install system deps
@@ -7,8 +12,8 @@ RUN apt-get update && \
7
  apt-get install -y nginx supervisor curl && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
- # Copy conduit binary — it's in a nix store path, use glob to find it
11
- COPY --from=conduit /nix/store/*/bin/conduit /usr/local/bin/conduit
12
  RUN chmod +x /usr/local/bin/conduit
13
 
14
  # Install Python deps
 
1
  FROM docker.io/matrixconduit/matrix-conduit:latest AS conduit
2
 
3
+ FROM debian:bookworm-slim AS conduit-extract
4
+ # Copy the entire nix store from conduit image, then find and move the binary
5
+ COPY --from=conduit /nix /nix
6
+ RUN find /nix -name "conduit" -type f | head -1 | xargs -I{} cp {} /conduit-bin
7
+
8
  FROM python:3.11-slim
9
 
10
  # Install system deps
 
12
  apt-get install -y nginx supervisor curl && \
13
  rm -rf /var/lib/apt/lists/*
14
 
15
+ # Copy conduit binary
16
+ COPY --from=conduit-extract /conduit-bin /usr/local/bin/conduit
17
  RUN chmod +x /usr/local/bin/conduit
18
 
19
  # Install Python deps
supervisord.conf CHANGED
@@ -15,7 +15,7 @@ stderr_logfile=/dev/fd/2
15
  stderr_logfile_maxbytes=0
16
 
17
  [program:fastapi]
18
- command=uvicorn app.main:app --host 0.0.0.0 --port 8000
19
  directory=/app
20
  autostart=true
21
  autorestart=true
 
15
  stderr_logfile_maxbytes=0
16
 
17
  [program:fastapi]
18
+ command=uvicorn main:app --host 0.0.0.0 --port 8000
19
  directory=/app
20
  autostart=true
21
  autorestart=true