visual-search-api / Dockerfile
AdarshDRC's picture
Update Dockerfile
0a70bdc verified
raw
history blame
667 Bytes
# Use an official Python runtime
FROM python:3.10
# Set the working directory
WORKDIR /app
# --- UPDATED: Use libgl1 instead of the obsolete libgl1-mesa-glx ---
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the backend code
COPY . .
# Create the temp directory and give it permission
RUN mkdir -p temp_uploads
RUN chmod -R 777 temp_uploads
# Hugging Face port
EXPOSE 7860
# Start the FastAPI server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]