DXF_Generation / Dockerfile
Nighty3912's picture
Update Dockerfile
a25898b verified
raw
history blame
962 Bytes
# Use official Python 3.11 image
FROM python:3.11.4-slim
# Avoid prompts during builds
ENV DEBIAN_FRONTEND=noninteractive
# Set working directory
WORKDIR /app
# Install system-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 to avoid wheel issues
RUN pip install --upgrade pip setuptools wheel build
# Install OpenAI CLIP from GitHub directly (outside requirements.txt)
RUN pip install git+https://github.com/openai/CLIP.git
# Copy and install remaining Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the app (e.g., app.py, assets, etc.)
COPY . .
# Expose Gradio’s default port
EXPOSE 7860
# Start the app (update this if your entry file is named differently)
CMD ["python", "app.py"]