File size: 1,011 Bytes
91a080f
 
b95065c
91a080f
 
 
 
 
 
7b0cb5f
 
b95065c
 
91a080f
 
 
 
b95065c
7b0cb5f
 
 
 
 
 
 
 
 
 
b95065c
 
7b0cb5f
b95065c
 
 
91a080f
 
 
 
 
 
 
 
 
 
 
 
 
 
824b3e3
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
41
42
43
44
45
46
47
48
49
50
FROM python:3.10-slim

# Install system dependencies in a single layer
RUN apt-get update && apt-get install -y \
    git \
    build-essential \
    wget \
    curl \
    bash \
    muscle \
    hmmer \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get clean

# Set working directory
WORKDIR /app

# Install Python dependencies in a single layer for better caching
RUN pip install --no-cache-dir \
    gradio==4.44.0 \
    transformers==4.36.0 \
    torch==2.1.0 \
    numpy==1.24.0 \
    pandas==2.0.0 \
    einops==0.7.0 \
    rotary-embedding-torch==0.8.9 \
    huggingface-hub>=0.19.0

# Clone and install ANARCI in a single layer
RUN git clone --depth 1 https://github.com/oxpig/ANARCI.git && \
    cd ANARCI && \
    pip install . && \
    cd .. && \
    rm -rf ANARCI

# Copy application files
COPY app.py .
COPY adapter.py .

# Expose port for Gradio
EXPOSE 7860

# Set environment variables
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860

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