mineru2 / Dockerfile
marcosremar2's picture
Rename app.py to main.py to force complete rebuild
8c5af8c
raw
history blame contribute delete
657 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 --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=user main.py .
EXPOSE 7860
# Start the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]