Spaces:
Build error
Build error
| # Use a lightweight base image with Python | |
| FROM python:3.9-slim | |
| # Install git and git-lfs for cloning large models | |
| RUN apt-get update && apt-get install -y git git-lfs | |
| # Initialize git-lfs | |
| RUN git-lfs install | |
| # Set the working directory | |
| WORKDIR /app | |
| # Clone the Hugging Face model repository (replace with the desired model URL) | |
| RUN git clone https://huggingface.co/matsant01/STEMerald-2b /app/model | |
| # Install necessary Python libraries | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code | |
| COPY . . | |
| # Expose the app port (if using FastAPI or another web server) | |
| EXPOSE 8000 | |
| # Command to run the FastAPI server | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |