This repository was archived by the owner on May 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +123
-0
lines changed Expand file tree Collapse file tree 4 files changed +123
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM nvcr.io/nvidia/pytorch:20.12-py3
2
+
3
+
4
+
5
+ COPY requirements_gpu.txt requirements_gpu.txt
6
+
7
+ ENV DEBIAN_FRONTEND=noninteractive
8
+
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ locales \
11
+ wget \
12
+ build-essential \
13
+ vim \
14
+ htop \
15
+ curl \
16
+ git less ssh cmake \
17
+ zip unzip gzip bzip2 \
18
+ python3-tk gcc g++ libpq-dev
19
+
20
+
21
+ RUN pip install -U pip && pip install -r requirements_gpu.txt
22
+ RUN pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
23
+
24
+ COPY . /app
25
+ WORKDIR /app
26
+ ENV PYTHONPATH="${PYTHONPATH}:/app"
27
+ # ENV STORAGE="S3"
28
+ ENV DATABASE_URL="/app/db/botsim_sqlite_demo.db"
29
+
30
+ EXPOSE 8501
31
+ ENTRYPOINT ["streamlit" , "run" , "/app/botsim/streamlit_app/app.py" ]
32
+
33
+
Original file line number Diff line number Diff line change
1
+ #
2
+ # Copyright (c) 2022, salesforce.com, inc.
3
+ # All rights reserved.
4
+ # SPDX-License-Identifier: BSD-3-Clause
5
+ # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ #
7
+
8
+ # authentication required for gcp
9
+ gcloud container clusters get-credentials $cluster_name --zone us-central1-a --project $project_name
10
+ kubens $user_name_space
11
+
12
+ # create gcp image
13
+ TAG=" gcr.io/${project_name} /botsim_streamlit_gpu"
14
+ gcloud builds submit . -t=$TAG --machine-type=n1-highcpu-32 --timeout=9000
15
+
16
+ # deploy to gcp
17
+ kubectl apply -n $user_name_space -f deploy_gpu_streamlit_botsim.yaml
18
+ kubectl -n $user_name_space get pods
19
+ kubectl -n $user_name_space get services
20
+
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : <deploy-name>
5
+ spec :
6
+ selector :
7
+ matchLabels :
8
+ app : botsim-streamlit-gpu-app
9
+ replicas : 1
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : botsim-streamlit-gpu-app
14
+ spec :
15
+ restartPolicy : Always
16
+ containers :
17
+ - name : botsim-streamlit-gpu
18
+ image : " gcr.io/<project_name>/botsim_streamlit_gpu"
19
+ ports :
20
+ - containerPort : 8501
21
+ resources :
22
+ limits :
23
+ nvidia.com/gpu : 1
24
+ cpu : " 7"
25
+ memory : 45G
26
+ tolerations :
27
+ - key : " gpu_num"
28
+ operator : " Equal"
29
+ value : " 1"
30
+ effect : " NoSchedule"
31
+
32
+ ---
33
+ apiVersion : v1
34
+ kind : Service
35
+ metadata :
36
+ name : <service-name>
37
+ labels :
38
+ app : botsim-streamlit-gpu-app
39
+ spec :
40
+ type : LoadBalancer
41
+ ports :
42
+ - port : 8501
43
+ targetPort : 8501
44
+ selector :
45
+ app : botsim-streamlit-gpu-app
Original file line number Diff line number Diff line change
1
+ boto3
2
+ networkx
3
+ streamlit_agraph==0.0.37
4
+ protobuf~=3.19.0
5
+ sre-yield==1.2
6
+ faker
7
+ xmlplain==1.6.0
8
+ matplotlib==3.3.4
9
+ rapidfuzz
10
+ httpx==0.22.0
11
+ asyncio==3.4.3
12
+ transformers==4.7.0
13
+ numpy
14
+ sentencepiece==0.1.96
15
+ sentence-transformers==2.1.0
16
+ flask
17
+ flask_cors
18
+ google-cloud-dialogflow-cx==1.8.0
19
+ psycopg2-binary
20
+ scikit-learn==0.24.2
21
+ pandas==1.1.5
22
+ streamlit==1.8.1
23
+ streamlit-chat
24
+ plotly
25
+ plotly_express
You can’t perform that action at this time.
0 commit comments