Spaces:
Sleeping
Sleeping
# Use an official Python base image | |
FROM python:3.12 | |
# Set the working directory | |
WORKDIR /app | |
# Copy the current directory contents into the container | |
COPY . /app | |
# Install MLflow and required dependencies | |
# RUN pip install mlflow==2.9.2 gunicorn | |
RUN pip install --upgrade pip setuptools wheel \ | |
&& pip install mlflow gunicorn psycopg2-binary | |
RUN mkdir -p /app/mlflow_data && chmod -R 777 /app/mlflow_data | |
# Expose the MLflow server port | |
EXPOSE 7860 | |
# Set environment variables (optional) | |
ENV MLFLOW_TRACKING_USERNAME=admin | |
ENV MLFLOW_TRACKING_PASSWORD=password | |
# Run the MLflow server script | |
CMD ["python", "app.py"] | |