-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.lmes-job
27 lines (21 loc) · 1.53 KB
/
Dockerfile.lmes-job
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
FROM registry.access.redhat.com/ubi9/python-311@sha256:fccda5088dd13d2a3f2659e4c904beb42fc164a0c909e765f01af31c58affae3
USER root
RUN sed -i.bak 's/include-system-site-packages = false/include-system-site-packages = true/' /opt/app-root/pyvenv.cfg
USER default
WORKDIR /opt/app-root/src
RUN mkdir /opt/app-root/src/hf_home && chmod g+rwx /opt/app-root/src/hf_home
RUN mkdir /opt/app-root/src/output && chmod g+rwx /opt/app-root/src/output
RUN mkdir /opt/app-root/src/my_tasks && chmod g+rwx /opt/app-root/src/my_tasks
RUN mkdir -p /opt/app-root/src/my_catalogs/cards && chmod -R g+rwx /opt/app-root/src/my_catalogs
RUN mkdir -p /opt/app-root/src/.cache
ENV PATH="/opt/app-root/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Clone the Git repository, check out v0.4.4 and install the Python package
RUN git clone https://github.com/opendatahub-io/lm-evaluation-harness.git && \
cd lm-evaluation-harness && git checkout release-0.4.5 && \
pip install --no-cache-dir --user -e .[api,ibm_watsonx_ai]
RUN python -c 'from lm_eval.tasks.unitxt import task; import os.path; print("class: !function " + task.__file__.replace("task.py", "task.Unitxt"))' > ./my_tasks/unitxt
ENV PYTHONPATH=/opt/app-root/src/.local/lib/python3.11/site-packages:/opt/app-root/src/lm-evaluation-harness:/opt/app-root/src:/opt/app-root/src/server
ENV HF_HOME=/opt/app-root/src/hf_home
ENV UNITXT_ARTIFACTORIES=/opt/app-root/src/my_catalogs
USER 65532:65532
CMD ["/opt/app-root/bin/python"]