-
Notifications
You must be signed in to change notification settings - Fork 136
/
Dockerfile
33 lines (25 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM nvidia/cuda:12.6.2-cudnn-devel-ubuntu24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHON_VERSION=3.12.7
ENV PATH=/usr/local/bin:$PATH
RUN apt update && apt install -y --no-install-recommends build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev \
libxmlsec1-dev libffi-dev liblzma-dev \
&& apt clean && rm -rf /var/lib/apt/lists/*
RUN curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar -xzf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure --enable-optimizations && \
make -j$(nproc) && \
make altinstall && \
cd .. && \
rm -rf Python-${PYTHON_VERSION} Python-${PYTHON_VERSION}.tgz
RUN ln -s /usr/local/bin/python3.12 /usr/local/bin/python && \
ln -s /usr/local/bin/pip3.12 /usr/local/bin/pip
COPY requirements.txt /modded-nanogpt/requirements.txt
WORKDIR /modded-nanogpt
RUN python -m pip install --upgrade pip && \
pip install -r requirements.txt
RUN pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 --upgrade
CMD ["bash"]
ENTRYPOINT []