Skip to content

Commit a66035b

Browse files
Get the elasticdl_ps path dynamically while building the docker image for elasticdl job. (#2130)
1 parent 501b552 commit a66035b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elasticdl_client/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def init_zoo(args):
5353
--extra-index-url={{ EXTRA_PYPI_INDEX }}
5454
5555
RUN pip install elasticdl --extra-index-url={{ EXTRA_PYPI_INDEX }}
56-
ENV PATH /usr/local/lib/python3.6/site-packages/elasticdl/go/bin:$PATH
56+
RUN /bin/bash -c\
57+
'PYTHON_PKG_PATH=$(pip3 show elasticdl | grep "Location:" | cut -d " " -f2);\
58+
echo "PATH=${PYTHON_PKG_PATH}/elasticdl/go/bin:$PATH" >> /root/.bashrc'
5759
5860
COPY . /model_zoo
5961
RUN pip install -r /model_zoo/requirements.txt\

0 commit comments

Comments
 (0)