Dockerfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # syntax=docker/dockerfile:experimental
  2. #
  3. # Copyright 2018-2022 Elyra Authors
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # Ubuntu 20.04.2 LTS (Focal Fossa)
  18. # Repository: https://hub.docker.com/r/jupyterhub/k8s-singleuser-sample/tags
  19. FROM jupyterhub/k8s-singleuser-sample:1.2.0
  20. ARG TAG="dev"
  21. ARG ELYRA_VERSION
  22. ARG ELYRA_PACKAGE=elyra-"$ELYRA_VERSION"-py3-none-any.whl
  23. COPY $ELYRA_PACKAGE requirements.txt ./
  24. # Install Elyra
  25. RUN if [ "$TAG" = "dev" ] ; then \
  26. python3 -m pip install --quiet --no-cache-dir "$ELYRA_PACKAGE"[all] && rm $ELYRA_PACKAGE; \
  27. else \
  28. python3 -m pip install --quiet --no-cache-dir elyra[all]=="$TAG" ; fi
  29. # Install custom requirements
  30. RUN python3 -m pip install -r requirements.txt && rm requirements.txt
  31. # Install component examples catalogs
  32. # - this wail fail if the 'kfp-examples' pip extra is not installed
  33. RUN elyra-metadata create component-catalogs \
  34. --schema_name=elyra-kfp-examples-catalog \
  35. --display_name="Kubeflow Pipelines examples" \
  36. --runtime_type=KUBEFLOW_PIPELINES \
  37. --categories="['examples']"
  38. # Copy Elyra entrypoint
  39. COPY --chmod=0755 --chown=root:root start-elyra.sh /usr/local/bin/start-elyra.sh
  40. CMD ["/usr/local/bin/start-elyra.sh"]