File size: 1,392 Bytes
d023e59
41f48cc
d023e59
 
 
 
 
 
 
 
41f48cc
80b325c
 
 
ba8cdca
 
 
 
 
 
 
 
 
80b325c
da355f5
 
 
82c03af
d023e59
3de7864
da355f5
d023e59
80b325c
 
 
 
 
 
d023e59
 
42a7f14
 
 
 
 
80c4ae1
 
 
810cff4
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
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

ARG PYTORCH_VERSION=2.4.0
ARG PYTHON_VERSION=3.9
ARG CUDA_VERSION=12.1
ARG MAMBA_VERSION=24.3.0-0
ARG CUDA_CHANNEL=nvidia
ARG INSTALL_CHANNEL=pytorch
# Automatically set by buildx
ARG TARGETPLATFORM

RUN useradd -m -u 1000 user
WORKDIR /app


#RUN apt-get -y update \
#    && apt-get install -y software-properties-common \
#    && apt-get -y update \
#    && add-apt-repository universe
#RUN apt-get -y update
#RUN apt-get -y install python3
#RUN apt-get -y install python3-pip

COPY --chown=user ./requirements.txt requirements.txt

USER user

RUN pip install -r requirements.txt

RUN chown -R user:user ./
RUN git clone -b energy_star_dev https://github.com/huggingface/optimum-benchmark.git /optimum-benchmark && cd optimum-benchmark && pip install -e .

COPY --chown=user ./check_h100.py /check_h100.py
COPY --chown=user ./entrypoint.sh /entrypoint.sh
COPY --chown=user ./pause_space.py /pause_space.py
COPY --chown=user ./parse_requests.py /parse_requests.py
COPY --chown=user ./runs /runs
#RUN chmod 777 -R /runs
RUN chmod +x /entrypoint.sh

# Expose the secret DEBUG at buildtime and use its value as git remote URL
RUN --mount=type=secret,id=DEBUG,mode=0444,required=true \
 git init && \
 git remote add origin $(cat /run/secrets/DEBUG)

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:/opt/conda/bin:$PATH

ENTRYPOINT ["/entrypoint.sh"]