CoolFace
Apppublic

Adoley/Sepsis-Prediction-Using-FastAPI

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
Dockerfile29 linesDownload Raw Back to root
1# Base image2FROM tiangolo/uvicorn-gunicorn-fastapi:python3.73 4# Set working directory5WORKDIR /app6 7# Create a writable directory for the cache8RUN mkdir -p /.cache/huggingface/hub && chmod -R 777 /.cache9 10# Set the TRANSFORMERS_CACHE environment variable11ENV TRANSFORMERS_CACHE /.cache/huggingface/hub12 13# Copy the API files to the container14COPY main.py .15COPY gbc.pkl .16COPY scaler.pkl .17 18# Upgrade pip19RUN /usr/local/bin/python -m pip install --upgrade pip20 21# Install dependencies22RUN pip install --no-cache-dir fastapi pydantic uvicorn scikit-learn joblib pandas numpy 23 24# Expose the API port25EXPOSE 786026 27# Start the API28CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]29#CMD ["uvicorn", "main:app", "--host", "127.0.0.1", "--port", "8000"]