File size: 693 Bytes
b7bf6bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
FROM python:3.11-slim
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir \
fastapi==0.113.0 \
pymongo==4.9.1 \
pandas==2.2.3 \
numpy==1.26.4 \
scikit-learn==1.5.2 \
joblib==1.4.2 \
uvicorn==0.30.6
# Copy your application files
COPY . .
# Expose the port
EXPOSE 7860
# Command to run your application
CMD ["python", "app.py"]
|