-

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Topik

catatan

Example Dockerfile

FROM public.ecr.aws/amazonlinux/amazonlinux:2023 ARG NB_USER="sagemaker-user" ARG NB_UID=1000 ARG NB_GID=100 # Install Python3, pip, and other dependencies RUN yum install -y \ python3 \ python3-pip \ python3-devel \ gcc \ shadow-utils && \ useradd --create-home --shell /bin/bash --gid "${NB_GID}" --uid ${NB_UID} ${NB_USER} && \ yum clean all RUN python3 -m pip install --no-cache-dir \ 'jupyterlab>=4.0.0,<5.0.0' \ urllib3 \ jupyter-activity-monitor-extension \ --ignore-installed # Verify versions RUN python3 --version && \ jupyter lab --version USER ${NB_UID} CMD jupyter lab --ip 0.0.0.0 --port 8888 \ --ServerApp.base_url="/jupyterlab/default" \ --ServerApp.token='' \ --ServerApp.allow_origin='*'
Example Dockerfile

FROM public.ecr.aws/sagemaker/sagemaker-distribution:latest-cpu ARG NB_USER="sagemaker-user" ARG NB_UID=1000 ARG NB_GID=100 ENV MAMBA_USER=$NB_USER USER root RUN apt-get update RUN micromamba install sagemaker-inference --freeze-installed --yes --channel conda-forge --name base USER $MAMBA_USER ENTRYPOINT ["entrypoint-jupyter-server"]