Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1234567891011121314151617181920212223242526FROM python:3.10-slimRUN apt-get update && apt-get install -y --no-install-recommends \build-essential gcc curl && \rm -rf /var/lib/apt/lists/*RUN useradd -m -u 1000 userUSER userENV PATH="/home/user/.local/bin:$PATH"WORKDIR /app# UTF-8 encoding fixENV PYTHONIOENCODING=utf-8ENV LANG=C.UTF-8ENV LC_ALL=C.UTF-8COPY requirements.txt .RUN pip install --no-cache-dir --upgrade -r requirements.txtCOPY . .ENV PORT=7860EXPOSE $PORTCMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port $PORT --proxy-headers --forwarded-allow-ips='*'"]1234567891011121314151617181920212223242526272829# =====================================================# Dockerfile — Pegos Data API (FastAPI + HF Spaces)# =====================================================FROM python:3.10-slim# Sistem güncellemeleri ve bağımlılıklarRUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*# Uygulama diziniWORKDIR /app# Python bağımlılıklarını yükleCOPY requirements.txt .RUN pip install --no-cache-dir --upgrade -r requirements.txt# Uygulama dosyalarını kopyalaCOPY . .# Hugging Face Spaces uyumlu dinamik portENV PORT=7860EXPOSE $PORT# Non-root kullanıcıRUN useradd -m userUSER user# FastAPI sunucusunu başlatCMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port $PORT"]
Dockerfile+16-13