haseebnawazz's picture
Update Dockerfile
7fee830 verified
raw
history blame contribute delete
559 Bytes
# Use an official Python image
FROM python:3.9
# Set the working directory inside the container
WORKDIR /app
# Copy all necessary files
COPY api.py /app
COPY requirements.txt /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the default Hugging Face port
EXPOSE 7860
# Start FastAPI using Uvicorn
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
# downgrade scikit-learn to 1.3.0
RUN pip install scikit-learn==1.3.0
# try updating dependencies
RUN pip install --upgrade scikit-learn numpy joblib