Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Use an official Ubuntu as a parent image
  2. FROM ubuntu:22.04
  3. # Update the system and install dependencies
  4. RUN apt-get update -y
  5. # software-properties-common
  6. # Add the deadsnakes PPA, which contains newer Python versions
  7. #RUN add-apt-repository ppa:deadsnakes/ppa
  8. # Update the system and install Python and build dependencies
  9. RUN apt-get update -y && apt install -y \
  10. build-essential \
  11. gcc \
  12. curl \
  13. sqlite3 \
  14. gdb \
  15. libssl-dev
  16. ENV DEBIAN_FRONTEND noninteractive
  17. # Install Python 3.11
  18. RUN apt-get update && apt-get install -y \
  19. python3.12 \
  20. python3.12-venv \
  21. python3.12-dev \
  22. python3-pip \
  23. git
  24. RUN rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED
  25. RUN python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && \
  26. pip install numpy scipy numba Pillow jax jaxlib python-chess torch -i https://pypi.tuna.tsinghua.edu.cn/simple
  27. # Install Rust
  28. RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  29. # Ensure Rust binaries are in PATH
  30. ENV PATH="/root/.cargo/bin:${PATH}"
  31. RUN ln -s /usr/bin/python3 /usr/bin/python
  32. # Set the working directory in the container
  33. WORKDIR /usr/src/app
  34. # Any additional commands or environment variables can be added here
  35. # Command to run when the container launches
  36. CMD ["/bin/bash"]