geetest-slider-api / Dockerfile
doniramdani820's picture
Upload 6 files
fbad51d verified
raw
history blame contribute delete
681 Bytes
FROM python:3.9-slim
# Environment variables for ONNX Runtime 1.18.0
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV OMP_NUM_THREADS=1
ENV ORT_DISABLE_ALL_WARNINGS=1
ENV ONNXRUNTIME_DISABLE_STACK_EXECUTABILITY_WARNING=1
# Working directory
WORKDIR /app
# Copy and install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Expose port
EXPOSE 7860
# Start application with more verbose logging and timeout settings
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "300", "--log-level", "info"]