Spaces:
Running
Running
File size: 750 Bytes
5f4eeb1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# Use Python base image
FROM python:3.12
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
RUN python -c "import clip; clip.load('ViT-B/32', device = 'cpu', jit=False)"
# Copy the application code and models
COPY ./Apps ./Apps
COPY ./Lib/Models ./Models
# Expose the port
EXPOSE 8000
# Command to run the FastAPI application
CMD ["uvicorn", "Apps.app:app", "--host", "0.0.0.0", "--port", "8000"] |