RL-Inventory-Simulations / Dockerfile.northflank
Arvind Sreenivas
fix: use nvidia/cuda devel base image so vllm can build with CUDA toolkit
b52921e
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
software-properties-common curl git build-essential && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y \
python3.12 python3.12-venv python3.12-dev && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
rm -rf /var/lib/apt/lists/*
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir "torch==2.6.0" && \
pip install --no-cache-dir "xformers==0.0.29.post2" && \
pip install --no-cache-dir vllm && \
pip install --no-cache-dir -r requirements.txt && \
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth unsloth_zoo
COPY config.py demand_calculator.py demand_environment.py \
inventory_manager.py order_processor.py performance_tracker.py \
agent_environment.py montecarlo_simulator.py reward.py main.py ./
COPY server/ ./server/
COPY agent/ ./agent/
COPY client/ ./client/
COPY start.sh ./start.sh
RUN chmod +x start.sh
RUN useradd -m user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
EXPOSE 8000
CMD ["/bin/bash", "start.sh"]