File size: 863 Bytes
e23fefd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d25f9a2
e23fefd
 
 
 
d25f9a2
e23fefd
 
 
 
 
 
 
4eba291
 
 
e23fefd
 
 
 
 
 
 
 
 
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
38
39
40
# Use official Python image
FROM python:3.11-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_DEFAULT_TIMEOUT=100
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    cmake \
    libopenblas-dev \
    liblapack-dev \
    libgomp1 \
    gfortran \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*


# Create and set working directory
WORKDIR /app

# Copy only requirements first to leverage Docker cache
COPY requirements.txt .

# Install Python dependencies with retries
RUN echo "Installing Python dependencies..." && \
    pip install --no-cache-dir --verbose -r requirements.txt


# Copy application files
COPY . .

# Expose Gradio port
EXPOSE 7860

# Start the application
CMD ["python", "app.py"]