FROM ubuntu:22.04

# Set the locale
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    libssl-dev \
    ninja-build \
    python3 \
    python3-pip \
    python3-venv \
    wget \
    git \
    && rm -rf /var/lib/apt/lists/*

# Download and install nlohmann/json.hpp
RUN mkdir -p /usr/local/include/nlohmann \
    && wget https://raw.githubusercontent.com/nlohmann/json/develop/single_include/nlohmann/json.hpp \
    -O /usr/local/include/nlohmann/json.hpp

# Install Python packages
WORKDIR /workspace
COPY requirements.txt .
RUN if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
