Chat / Dockerfile
1Egyb's picture
Rename Dockerfile.txt to Dockerfile
2c0c984 verified
raw
history blame contribute delete
545 Bytes
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y gcc g++ && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
# [span_6](start_span)التأكد من وجود مجلد static لخدمة الملفات[span_6](end_span)
RUN mkdir -p logs static
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
USER appuser
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]