File size: 801 Bytes
69d4a4b
 
c1c64b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b46dbbf
c1c64b0
ee36ed0
c1c64b0
 
ee36ed0
 
 
c1c64b0
 
 
 
 
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
# Use Python 3.12 as the base image
FROM python:3.12-slim

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
    GRADIO_SERVER_NAME="0.0.0.0" \
    HOME=/home/user

# Create a non-root user
RUN useradd -m -u 1000 user
WORKDIR $HOME/app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    git \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and install
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir huggingface_hub

# Copy the application code and local logic shards
COPY --chown=user . .

# Install the local phi_infinity_lattice_compression package
RUN pip install -e .

# Expose the port Gradio runs on
EXPOSE 7860

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