DXF_Generation / Dockerfile
Nighty3912's picture
Update Dockerfile
10e36a3 verified
raw
history blame
976 Bytes
# Use Python 3.11 base image
FROM python:3.11.4-slim
# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Set working directory
WORKDIR /app
# Install OS-level dependencies
RUN apt-get update && apt-get install -y \
git \
build-essential \
ffmpeg \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip and install build tools
RUN pip install --upgrade pip setuptools wheel build
# ✅ Manually install Ultralytics CLIP fork using legacy build mode
RUN pip install --no-use-pep517 git+https://github.com/ultralytics/CLIP.git
# Copy requirements.txt and install remaining dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose Gradio’s port (Hugging Face Spaces uses this)
EXPOSE 7860
# Start the application (adjust if your entrypoint file is named differently)
CMD ["python", "app.py"]