devve1 commited on
Commit
571b077
1 Parent(s): 673a2df

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && apt-get install --no-install-recommends -y \
6
+ curl \
7
+ build-essential \
8
+ python3.9 \
9
+ python3-pip \
10
+ git \
11
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
12
+
13
+ RUN curl https://ollama.ai/install.sh | sh
14
+
15
+ WORKDIR /app
16
+
17
+ COPY ./requirements.txt /app/requirements.txt
18
+
19
+ RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
20
+
21
+ RUN useradd -m -u 1000 user
22
+ USER user
23
+
24
+ ENV HOME=/home/user \
25
+ PATH=/home/user/.local/bin:$PATH \
26
+ PYTHONPATH=$HOME/app \
27
+ PYTHONUNBUFFERED=1 \
28
+ NVIDIA_VISIBLE_DEVICES=all \
29
+ SYSTEM=spaces
30
+
31
+ WORKDIR $HOME/app
32
+
33
+ COPY --chown=user . $HOME/app
34
+ EXPOSE 8501
35
+ CMD streamlit run app.py \
36
+ --server.headless true \
37
+ --server.enableCORS false \
38
+ --server.enableXsrfProtection false \
39
+ --server.fileWatcherType none