| FROM ubuntu:24.04 |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| python3 python3-pip python3-venv curl build-essential cmake pkg-config libssl-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| ENV VIRTUAL_ENV=/opt/venv |
| RUN python3 -m venv $VIRTUAL_ENV |
| ENV PATH="$VIRTUAL_ENV/bin:$PATH" |
|
|
| |
| |
| RUN userdel -r ubuntu || true && useradd -m -u 1000 user && chown -R user:user /opt/venv |
|
|
| |
| USER user |
|
|
| |
| ENV HOME=/home/user \ |
| PATH=/home/user/.local/bin:/home/user/.cargo/bin:$PATH |
|
|
| |
| RUN curl https://sh.rustup.rs -sSf | sh -s -- -y |
|
|
| |
| WORKDIR $HOME/app |
|
|
| |
| COPY --chown=user . $HOME/app |
|
|
| |
| RUN cd neural_engine && cargo build --release |
|
|
| |
| RUN curl -L -o ./model.onnx "https://huggingface.co/dpv007/Neurex-Weights/resolve/main/model.onnx?v=5" || true |
| RUN curl -L -o ./model.onnx.data "https://huggingface.co/dpv007/Neurex-Weights/resolve/main/model.onnx.data?v=5" || true |
| RUN curl -L -o ./model_int8.onnx "https://huggingface.co/dpv007/Neurex-Weights/resolve/main/model_int8.onnx?v=5" || true |
| RUN curl -L -o ./model_int8.onnx.data "https://huggingface.co/dpv007/Neurex-Weights/resolve/main/model_int8.onnx.data?v=5" || true |
|
|
| |
| RUN mkdir -p Neurex_Engine && \ |
| cp neural_engine/target/release/neural_engine Neurex_Engine/Neurex && \ |
| cp model.onnx Neurex_Engine/ || true && \ |
| cp model_int8.onnx Neurex_Engine/ || true && \ |
| cp vocab.json Neurex_Engine/ || true |
|
|
| |
| RUN chmod +x Neurex_Engine/Neurex && \ |
| chmod +x VeloCT_Ultimate || true |
|
|
| |
| RUN pip install --no-cache-dir -r requirements.txt && \ |
| pip install --no-cache-dir -r lichess-bot/requirements.txt |
|
|
| |
| RUN chmod +x start.sh |
|
|
| EXPOSE 7860 |
|
|
| CMD ["./start.sh"] |
|
|