Spaces:
Sleeping
Sleeping
File size: 839 Bytes
087fbf6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# Use an official Python image as the base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the current directory contents to the container
COPY . /app
# Install required system dependencies (optional, modify as needed)
RUN apt-get update && apt-get install -y --no-install-recommends \
git && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies from requirements.txt (if available)
# Create a requirements.txt file with all necessary packages
RUN pip install --no-cache-dir notebook pandas mlflow
# Expose the default Jupyter Notebook port
EXPOSE 8888
# Add a runtime argument for authentication (optional)
ARG CR_PAT
ARG USERNAME
# Default command to run the Jupyter Notebook
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]
|