-
-
Notifications
You must be signed in to change notification settings - Fork 501
Expand file tree
/
Copy pathdockerfile
More file actions
27 lines (19 loc) · 722 Bytes
/
dockerfile
File metadata and controls
27 lines (19 loc) · 722 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
# Use official Python slim image
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PATH="/root/.local/bin:$PATH"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl git && rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
WORKDIR /app
# Copy dependency files
COPY pyproject.toml poetry.lock* /app/
# Install dependencies via Poetry
RUN poetry install --no-root --no-interaction --no-ansi
# Copy application code
COPY . .
# Run JupyterLab instead of notebook
CMD ["poetry", "run", "jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]