# Base image | |
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7 | |
# Set working directory | |
WORKDIR /app | |
# Copy the API files to the container | |
COPY . /app | |
# Install dependencies | |
RUN pip install --no-cache-dir fastapi pydantic uvicorn scikit-learn joblib pandas numpy | |
# Expose the API port | |
EXPOSE 80 | |
# Start the API | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"] | |