mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 11:30:00 +00:00
34 lines
921 B
Text
34 lines
921 B
Text
# Use Python 3.11 slim image as base
|
|
FROM python:3.11-slim-bookworm
|
|
|
|
# Install uv using the official method
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
|
|
|
|
# Install system dependencies required for building certain Python packages
|
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
|
gcc \
|
|
curl wget libmagic-dev ffmpeg supervisor \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install SurrealDB
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh
|
|
|
|
# Set the working directory in the container to /app
|
|
WORKDIR /app
|
|
|
|
COPY . /app
|
|
RUN uv sync
|
|
|
|
# Create supervisor configuration directory
|
|
RUN mkdir -p /etc/supervisor/conf.d
|
|
|
|
# Copy supervisor configuration file
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
EXPOSE 8502
|
|
|
|
RUN mkdir -p /app/data
|
|
|
|
# Use supervisor as the main process
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|