|
FROM node:22-bookworm-slim |
|
|
|
WORKDIR /app |
|
|
|
RUN apt-get update && \ |
|
apt-get install -y python3 python3-pip build-essential && \ |
|
apt-get clean && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir --break-system-packages -U pip && \ |
|
pip install --no-cache-dir --break-system-packages -r requirements.txt |
|
|
|
COPY hardhat hardhat |
|
WORKDIR /app/hardhat |
|
RUN npm install && \ |
|
npx hardhat compile && \ |
|
rm -rf contracts test cache |
|
|
|
WORKDIR /app |
|
COPY api . |
|
COPY init_tasks.py ./ |
|
ARG HF_DATASET |
|
RUN python3 init_tasks.py |
|
|
|
ENTRYPOINT ["./scripts/start-api.sh"] |
|
|