FROM python:3.11-slim # Install Dev Mode required packages RUN apt-get update && \ apt-get install -y \ bash \ git git-lfs \ wget curl procps \ htop vim nano && \ rm -rf /var/lib/apt/lists/* # Set up user with uid 1000 (required for Dev Mode) RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # App code must be in /app for Dev Mode to detect changes WORKDIR /app # Copy application code COPY --chown=user . /app # Install Python dependencies (if you have any) # RUN pip install --no-cache-dir -r requirements.txt # Expose the default Spaces port EXPOSE 7860 # CMD is required for Dev Mode - start a simple server placeholder # You can modify this via Dev Mode shell CMD ["python", "-m", "http.server", "7860"]