reg-system-backend / Dockerfile
preethishsg's picture
Upload Dockerfile
b3d6cd3 verified
raw
history blame contribute delete
706 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python packages
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create user for Hugging Face
RUN useradd -m -u 1000 user && \
chown -R user:user /app
USER user
# Set environment
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
# Expose port
EXPOSE 7860
# Run application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]