messenger / Dockerfile
lvwerra's picture
lvwerra HF Staff
Upload folder using huggingface_hub
44682c3 verified
Raw
History Blame Contribute Delete
1.04 kB
FROM docker.io/matrixconduit/matrix-conduit:latest AS conduit
FROM python:3.11-slim
# Install system deps
RUN apt-get update && \
apt-get install -y nginx supervisor curl && \
rm -rf /var/lib/apt/lists/*
# Copy the entire conduit nix store from official image and symlink the binary
COPY --from=conduit /nix /nix
RUN find /nix -name "conduit" -type f | head -1 | xargs -I{} ln -sf {} /usr/local/bin/conduit && \
chmod +x /usr/local/bin/conduit && \
conduit --version || echo "conduit binary ready"
# Install Python deps
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Config files
COPY conduit.toml /etc/conduit/conduit.toml
COPY nginx.conf /etc/nginx/nginx.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Scripts
COPY start.sh /start.sh
COPY sync_loop.sh /sync_loop.sh
RUN chmod +x /start.sh /sync_loop.sh
# Application
COPY app/ /app/
# Create directories
RUN mkdir -p /data/conduit /var/log/supervisor
EXPOSE 7860
CMD ["/start.sh"]