-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·61 lines (49 loc) · 1.67 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·61 lines (49 loc) · 1.67 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#FROM nvidia/cuda:12.6.2-cudnn-runtime-ubuntu24.04
FROM nvidia/cuda:12.5.0-runtime-ubuntu20.04
# declare the image name
# ENV IMG_NAME=11.6.0-devel-ubuntu20.04 \
# declare what jaxlib tag to use
# if a CI/CD system is expected to pass in these arguments
# the dockerfile should be modified accordingly
# JAXLIB_VERSION=0.3.2
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# install python3-pip
RUN chmod 1777 /tmp
RUN apt-get update --fix-missing
RUN apt upgrade -y
RUN apt-get install software-properties-common -y
RUN apt-get install vim tmux git --fix-missing -y
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt install cuda-nvcc-12-6 -y
RUN apt install python3.11 python3.11-distutils -y
RUN apt-get install curl -y
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
RUN apt install python3.11-dev -y
ARG UID
ARG GID
RUN userdel -f $(getent passwd $UID | cut -d: -f1) 2>/dev/null || true
# Create ifg_user group with a unique GID or use existing group
RUN groupadd -g $GID ifg_user 2>/dev/null || groupadd ifg_user
RUN useradd -d /project -u $UID -g ifg_user --create-home ifg_user
RUN mkdir /scratch
RUN mkdir /mount
RUN ln -sf $(which python3.11) /usr/bin/python
RUN chmod +777 /mount
RUN chmod +777 /scratch
USER ifg_user
COPY requirements.txt .
RUN mkdir /project/IFG
COPY . /project/IFG
RUN python3.11 -m pip install -r requirements.txt
ENV DS_BUILD_OPS=0
ENV DS_BUILD_CPU_ADAM=1
RUN pip install deepspeed --no-cache
#ENV PATH "$PATH:/usr/local/bin"
ENV PATH "$PATH:/project/.local/bin"
USER root
RUN chown -R ifg_user:ifg_user /project
USER ifg_user
WORKDIR /project
CMD ["/bin/bash"]