File size: 997 Bytes
1536dad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.11.10

WORKDIR /app

COPY ./packages.txt /app/packages.txt

RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
RUN pip install pip3-autoremove
RUN pip-autoremove torch torchvision torchaudio -y
RUN pip install "torch==2.4.0" "xformers==0.0.27.post2" triton torchvision torchaudio
RUN pip install "unsloth[kaggle-new] @ git+https://github.com/unslothai/unsloth.git"
RUN pip install pandas==2.2.2 peft huggingface_hub==0.23.5 einops hydra-core langchain-core langchain-huggingface langchain-community datasets tqdm wandb numpy accelerate span_marker spacy date-spacy streamlit fastapi faiss-cpu


# User
RUN useradd -m -u 1000 user
USER user
ENV HOME /home/user
ENV PATH $HOME/.local/bin:$PATH

WORKDIR $HOME
RUN mkdir app
WORKDIR $HOME/app
COPY . $HOME/app

EXPOSE 8501
CMD streamlit run app.py \
    --server.headless true \
    --server.enableCORS false \
    --server.enableXsrfProtection false \
    --server.fileWatcherType none