Skip to content

Commit b620bbd

Browse files
committed
Share also transformers-musicgen
1 parent a546a97 commit b620bbd

File tree

8 files changed

+110
-154
lines changed

8 files changed

+110
-154
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
CONDA_ENV_PATH = "transformers.yml"
2+
3+
ifeq ($(BUILD_TYPE), cublas)
4+
CONDA_ENV_PATH = "transformers-nvidia.yml"
5+
endif
6+
17
.PHONY: transformers
28
transformers:
3-
@echo "Running install..."
4-
bash install.sh
9+
@echo "Installing $(CONDA_ENV_PATH)..."
10+
bash install.sh $(CONDA_ENV_PATH)

backend/python/common-env/transformers/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ conda_env_exists(){
88

99
if conda_env_exists "transformers" ; then
1010
echo "Creating virtual environment..."
11-
conda env create --name transformers --file transformers.yml
11+
conda env create --name transformers --file $1
1212
echo "Virtual environment created."
1313
else
1414
echo "Virtual environment already exists."
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: transformers
2+
channels:
3+
- defaults
4+
dependencies:
5+
- _libgcc_mutex=0.1=main
6+
- _openmp_mutex=5.1=1_gnu
7+
- bzip2=1.0.8=h7b6447c_0
8+
- ca-certificates=2023.08.22=h06a4308_0
9+
- ld_impl_linux-64=2.38=h1181459_1
10+
- libffi=3.4.4=h6a678d5_0
11+
- libgcc-ng=11.2.0=h1234567_1
12+
- libgomp=11.2.0=h1234567_1
13+
- libstdcxx-ng=11.2.0=h1234567_1
14+
- libuuid=1.41.5=h5eee18b_0
15+
- ncurses=6.4=h6a678d5_0
16+
- openssl=3.0.11=h7f8727e_2
17+
- pip=23.2.1=py311h06a4308_0
18+
- python=3.11.5=h955ad1f_0
19+
- readline=8.2=h5eee18b_0
20+
- setuptools=68.0.0=py311h06a4308_0
21+
- sqlite=3.41.2=h5eee18b_0
22+
- tk=8.6.12=h1ccaba5_0
23+
- wheel=0.41.2=py311h06a4308_0
24+
- xz=5.4.2=h5eee18b_0
25+
- zlib=1.2.13=h5eee18b_0
26+
- pip:
27+
- accelerate==0.23.0
28+
- aiohttp==3.8.5
29+
- aiosignal==1.3.1
30+
- async-timeout==4.0.3
31+
- attrs==23.1.0
32+
- bark==0.1.5
33+
- boto3==1.28.61
34+
- botocore==1.31.61
35+
- certifi==2023.7.22
36+
- charset-normalizer==3.3.0
37+
- datasets==2.14.5
38+
- sentence-transformers==2.2.2
39+
- sentencepiece==0.1.99
40+
- dill==0.3.7
41+
- einops==0.7.0
42+
- encodec==0.1.1
43+
- filelock==3.12.4
44+
- frozenlist==1.4.0
45+
- fsspec==2023.6.0
46+
- funcy==2.0
47+
- grpcio==1.59.0
48+
- huggingface-hub==0.16.4
49+
- idna==3.4
50+
- jinja2==3.1.2
51+
- jmespath==1.0.1
52+
- markupsafe==2.1.3
53+
- mpmath==1.3.0
54+
- multidict==6.0.4
55+
- multiprocess==0.70.15
56+
- networkx==3.1
57+
- numpy==1.26.0
58+
- nvidia-cublas-cu12==12.1.3.1
59+
- nvidia-cuda-cupti-cu12==12.1.105
60+
- nvidia-cuda-nvrtc-cu12==12.1.105
61+
- nvidia-cuda-runtime-cu12==12.1.105
62+
- nvidia-cudnn-cu12==8.9.2.26
63+
- nvidia-cufft-cu12==11.0.2.54
64+
- nvidia-curand-cu12==10.3.2.106
65+
- nvidia-cusolver-cu12==11.4.5.107
66+
- nvidia-cusparse-cu12==12.1.0.106
67+
- nvidia-nccl-cu12==2.18.1
68+
- nvidia-nvjitlink-cu12==12.2.140
69+
- nvidia-nvtx-cu12==12.1.105
70+
- packaging==23.2
71+
- pandas==2.1.1
72+
- peft==0.5.0
73+
- git+https://github.com/bigscience-workshop/petals
74+
- protobuf==4.24.4
75+
- psutil==5.9.5
76+
- pyarrow==13.0.0
77+
- python-dateutil==2.8.2
78+
- pytz==2023.3.post1
79+
- pyyaml==6.0.1
80+
- regex==2023.10.3
81+
- requests==2.31.0
82+
- rouge==1.0.1
83+
- s3transfer==0.7.0
84+
- safetensors==0.3.3
85+
- scipy==1.11.3
86+
- six==1.16.0
87+
- sympy==1.12
88+
- tokenizers==0.14.0
89+
- torch==2.1.0
90+
- torchaudio==2.1.0
91+
- tqdm==4.66.1
92+
- transformers==4.34.0
93+
- triton==2.1.0
94+
- typing-extensions==4.8.0
95+
- tzdata==2023.3
96+
- urllib3==1.26.17
97+
- xxhash==3.4.1
98+
- yarl==1.9.2
99+
prefix: /opt/conda/envs/transformers

backend/python/common-env/transformers/transformers.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,6 @@ dependencies:
5555
- multiprocess==0.70.15
5656
- networkx==3.1
5757
- numpy==1.26.0
58-
- nvidia-cublas-cu12==12.1.3.1
59-
- nvidia-cuda-cupti-cu12==12.1.105
60-
- nvidia-cuda-nvrtc-cu12==12.1.105
61-
- nvidia-cuda-runtime-cu12==12.1.105
62-
- nvidia-cudnn-cu12==8.9.2.26
63-
- nvidia-cufft-cu12==11.0.2.54
64-
- nvidia-curand-cu12==10.3.2.106
65-
- nvidia-cusolver-cu12==11.4.5.107
66-
- nvidia-cusparse-cu12==12.1.0.106
67-
- nvidia-nccl-cu12==2.18.1
68-
- nvidia-nvjitlink-cu12==12.2.140
69-
- nvidia-nvtx-cu12==12.1.105
7058
- packaging==23.2
7159
- pandas==2.1.1
7260
- peft==0.5.0

backend/python/transformers-musicgen/Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11

2-
TRANSFORMERS_MUSICGEN_CONDA_PATH = "transformers-musicgen.yml"
3-
4-
ifeq ($(BUILD_TYPE), cublas)
5-
TRANSFORMERS_MUSICGEN_CONDA_PATH = "transformers-musicgen-nvidia.yml"
6-
endif
7-
82
.PHONY: transformers-musicgen
93
transformers-musicgen:
10-
@echo "Creating virtual environment..."
11-
@conda env create --name transformers-musicgen --file $(TRANSFORMERS_MUSICGEN_CONDA_PATH)
12-
@echo "Virtual environment created."
4+
$(MAKE) -C ../common-env/transformers
135

146
.PHONY: run
157
run:

backend/python/transformers-musicgen/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## A bash script wrapper that runs the transformers server with conda
44

55
# Activate conda environment
6-
source activate transformers-musicgen
6+
source activate transformers
77

88
# get the directory where the bash script is located
99
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

backend/python/transformers-musicgen/transformers-musicgen-nvidia.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

backend/python/transformers-musicgen/transformers-musicgen.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)