generated from axioma-ai-labs/python-template
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
60 lines (44 loc) · 1.13 KB
/
Dockerfile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ==================
# Build Nevron Agent
# ==================
FROM python:3.13-slim
WORKDIR /nevron
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONFAULTHANDLER=1
# -----------------------
# Install system packages
# -----------------------
RUN apt-get update && apt-get install -y \
curl \
git \
gcc \
g++ \
build-essential \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add Poetry to PATH
ENV PATH="/root/.local/bin:$PATH"
# Configure Poetry
RUN poetry config virtualenvs.create false
# -------------------------
# Create the logs directory
# -------------------------
RUN mkdir logs
# ---------------------
# Setup the environment
# ---------------------
COPY pyproject.toml poetry.lock ./
# Install dependencies with Poetry
RUN poetry install --no-interaction --no-ansi --no-root --only main
# --------------
# Nevron Runtime
# --------------
COPY . /nevron
COPY entrypoint.sh /nevron/entrypoint.sh
RUN chmod +x /nevron/entrypoint.sh
# Command to run the application
ENTRYPOINT ["/nevron/entrypoint.sh"]