Skip to content

Commit

Permalink
Update pyfunc base docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Arief Rahmansyah committed Mar 5, 2024
1 parent e4e9dc9 commit 0d4a03c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions python/pyfunc-server/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,9 @@ ARG MODEL_DEPENDENCIES_URL
RUN gsutil cp ${MODEL_DEPENDENCIES_URL} conda.yaml
RUN conda env create --name merlin-model --file conda.yaml

# Copy and install pyfunc-server and merlin-sdk dependencies
COPY pyfunc-server /pyfunc-server
COPY sdk /sdk
ENV SDK_PATH=/sdk

WORKDIR /pyfunc-server
RUN /bin/bash -c ". activate merlin-model && pip uninstall -y merlin-sdk && pip install -r /pyfunc-server/requirements.txt"

# Download and dry-run user model artifacts and code
ARG MODEL_ARTIFACTS_URL
RUN gsutil -m cp -r ${MODEL_ARTIFACTS_URL} .
RUN /bin/bash -c ". activate merlin-model && python -m pyfuncserver --model_dir model --dry_run"
RUN /bin/bash -c ". activate merlin-model && pyfuncserver --model_dir model --dry_run"

CMD ["/bin/bash", "/pyfunc-server/run.sh"]
CMD ["/bin/bash", "-c", ". activate merlin-model && pyfuncserver --model_dir model"]
2 changes: 1 addition & 1 deletion python/pyfunc-server/docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM condaforge/miniforge3:23.3.1-1
FROM condaforge/miniforge3:23.11.0-0

ENV GCLOUD_VERSION=405.0.1
RUN wget -qO- https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz | tar xzf -
Expand Down

0 comments on commit 0d4a03c

Please sign in to comment.