-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 939 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use a specific Python version for better reproducibility
FROM python:3.12-slim
# Set work directory
WORKDIR /app
# Install uv from official Astral source
# Using the standalone installer for reliability
COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /usr/local/bin/uv
# Copy source code
COPY darts/ /app/darts/
# Copy only the files explicitly needed for installation
COPY pyproject.toml README.md /app/
# Install dependencies using uv
# --no-dev would install only core dependencies, but we want dev-all for the full environment
RUN uv sync --group dev-all
# Copy examples
COPY examples/ /app/examples/
# Set Python path so imports work correctly
ENV PATH="/app/.venv/bin:$PATH"
# Build and run instructions:
# docker build . -t darts:latest
# docker run -it -v $(pwd)/:/app/ darts:latest bash
#
# For Jupyter:
# docker run -it -p 8888:8888 darts:latest bash
# Then inside: uv run jupyter lab --ip 0.0.0.0 --no-browser --allow-root