26 lines
714 B
Docker
26 lines
714 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
POETRY_VIRTUALENVS_CREATE=false \
|
|
POETRY_NO_INTERACTION=1 \
|
|
POETRY_REQUESTS_TIMEOUT=120 \
|
|
POETRY_INSTALLER_MAX_WORKERS=4
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN pip install --no-cache-dir poetry
|
|
|
|
COPY pyproject.toml poetry.lock ./
|
|
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
|
poetry install --only main --no-root --no-ansi
|
|
|
|
COPY pyproject.toml poetry.lock* /workspace/
|
|
|
|
RUN poetry install --no-root
|
|
|
|
COPY . /workspace
|
|
|
|
EXPOSE 8888
|
|
|
|
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--ServerApp.token=", "--ServerApp.password=", "--ServerApp.custom_display_url=http://localhost:8888"] |