Spaces:
Sleeping
Sleeping
File size: 785 Bytes
db7a6f0 |
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 35 36 37 |
# Dockerfile for testing Hugging Face Spaces deployment locally
FROM python:3.11-slim
# Install system dependencies required for openslide and other packages
RUN apt-get update && apt-get install -y \
build-essential \
git \
libopenslide0 \
libopenslide-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy project files needed for installation
COPY pyproject.toml README.md ./
COPY src/ ./src/
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Set environment variables
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
# Expose the port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]
|