File size: 1,173 Bytes
8557bbe
 
b578375
 
 
 
 
 
 
8557bbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b578375
 
 
8557bbe
 
 
 
 
 
 
b578375
 
 
8557bbe
aca85cc
 
8557bbe
5e8ed1e
 
 
 
 
 
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
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04

RUN useradd -m -u 1000 user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH \
	DEBIAN_FRONTEND=noninteractive \
	STREAMLIT_WATCHER_TYPE=none

# Install dependencies
RUN apt-get update && apt-get install -y \
    python3.10 \
    python3-pip \
    git \
    texlive-latex-base \
    texlive-latex-extra \
    texlive-fonts-recommended \
    texlive-latex-recommended \
    latexmk \
    poppler-utils \
    && rm -rf /var/lib/apt/lists/*

# Copy the files
WORKDIR $HOME/app
COPY --chown=user ./requirements.txt requirements.txt


RUN pip install --upgrade pip \
    && pip install --no-cache-dir -r requirements.txt


RUN pip install --no-cache-dir https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.0.6/flash_attn-2.6.3+cu124torch2.6-cp310-cp310-linux_x86_64.whl

COPY --chown=user . $HOME/app

USER user

EXPOSE 7860

# Default command
ENTRYPOINT ["streamlit", "run", "app.py", \
  "--server.port=7860", \
  "--server.address=0.0.0.0", \
  "--server.enableXsrfProtection=false", \
  "--server.enableCORS=false", \
  "--server.headless=true"]