mineru2 / Dockerfile
marcosremar2's picture
Fix permission issues for HF Space Dev mode
57d51b7
raw
history blame
610 Bytes
FROM python:3.10-slim
# Install wget and git for HF Space requirements
RUN apt-get update && apt-get install -y \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
# Create a user with home directory for git config
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /app
# Copy and install requirements
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=user app.py .
EXPOSE 7860
# Start the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]