Upload folder using huggingface_hub
Browse files- Dockerfile +7 -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
|
| 11 |
-
COPY --from=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
|
| 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
|