Skip to content

Commit

Permalink
update images
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeimonakhov committed Oct 15, 2023
1 parent 2efd469 commit 5f65f1f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
22 changes: 17 additions & 5 deletions images/keras/cuda11-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,25 @@ RUN rm -rf /usr/local/bin/pip3 \

RUN ${INTERPRETER} -m pip install -r /tmp/requirements.txt

RUN ${INTERPRETER} -m pip install \
tensorflow-gpu==2.14.0 \
RUN \
case ${INTERPRETER} in \
python3.9) \
CP_FORMAT=cp39 \
;; \
python3.10) \
CP_FORMAT=cp310 \
;; \
python3.11) \
CP_FORMAT=cp311 \
;; \
esac \
&& ${INTERPRETER} -m pip install \
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.14.0-${CP_FORMAT}-${CP_FORMAT}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \
keras==2.14.0 \
jupyterlab==4.0.7 \
--index-url https://download.pytorch.org/whl/cu118 \
--extra-index-url https://pypi.org/simple \
&& ${INTERPRETER} -m pip cache purge
--index-url https://download.pytorch.org/whl/cu118 \
--extra-index-url https://pypi.org/simple \
&& ${INTERPRETER} -m pip cache purge

RUN curl https://rclone.org/install.sh -o ~/install.sh \
&& chmod +x ~/install.sh \
Expand Down
38 changes: 19 additions & 19 deletions template/required.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,29 @@ RUN curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest
RUN ${INTERPRETER} -m pip install -r /tmp/requirements.txt
{% endmacro %}

{%- macro convert_interpreter_to_cp(interpreter) -%}
{%- if interpreter == "python3.9" -%}
cp39
{%- elif interpreter == "python3.10" -%}
cp310
{%- elif interpreter == "python3.11" -%}
cp311
{%- else -%}
unknown
{%- endif %}
{% endmacro %}

{%- macro install_pip_package(packages, INTERPRETER) -%}
RUN \
{%- for package in packages -%}
{%- if package.type == "pip" and package.name != "tensorflow" -%}
{%- if package.version is defined %}
${INTERPRETER} -m pip install {{ package.name }}=={{ package.version }} \
case ${INTERPRETER} in \
python3.9) \
CP_FORMAT=cp39 \
;; \
python3.10) \
CP_FORMAT=cp310 \
;; \
python3.11) \
CP_FORMAT=cp311 \
;; \
esac \
&& ${INTERPRETER} -m pip install \
{%- for package in packages %}
{%- if package.type == "pip" -%}
{%- if package.version is defined and package.name != "tensorflow-gpu" %}
{{ package.name }}=={{ package.version }} \
{%- elif package.version is defined and package.name == "tensorflow-gpu" %}
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-{{ package.version }}-${CP_FORMAT}-${CP_FORMAT}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \
{%- else %}
${INTERPRETER} -m pip install {{ package.name }} \
{{ package.name }} \
{%- endif %}
{%- elif package.type == "pip" and package.name == "tensorflow" -%}
${INTERPRETER} -m pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-{{ package.version }}-{{ convert_interpreter_to_cp(INTERPRETER) }}-{{ convert_interpreter_to_cp(INTERPRETER) }}-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \
{%- endif %}
{%- endfor %}
--index-url https://download.pytorch.org/whl/cu118 \
Expand Down

0 comments on commit 5f65f1f

Please sign in to comment.