jaz3 / Dockerfile
hls1000's picture
Update Dockerfile
db11c8f verified
raw
history blame contribute delete
565 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir jupyterlab jupyter-server
ENV PORT=7860
ENV JUPYTER_PASSWORD=changeme
WORKDIR /workspace
CMD ["sh", "-c", "\
HASHED_PASSWORD=$(python - << 'EOF'\nfrom jupyter_server.auth import passwd\nimport os\nprint(passwd(os.environ['JUPYTER_PASSWORD']))\nEOF\n) && \
jupyter lab \
--ip=0.0.0.0 \
--port=7860 \
--no-browser \
--IdentityProvider.token='' \
--PasswordIdentityProvider.hashed_password=$HASHED_PASSWORD \
"]