Spaces:
Sleeping
Sleeping
# 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"] | |