Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit bc8cad1

Browse files
committed
few improvements
1 parent 8fdeade commit bc8cad1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM ovhcom/ai-training-pytorch
33
RUN apt-get update && \
44
apt install -y bash \
55
build-essential \
6-
libsndfile1-dev
6+
libsndfile1-dev \
7+
git-lfs
78

89
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
910
python3 -m pip install --no-cache-dir \
@@ -20,10 +21,12 @@ RUN mkdir -p /workspace/wav2vec/
2021

2122
COPY finetune.sh run_common_voice.py finetune_with_params.sh /workspace/wav2vec/
2223

23-
COPY home-server.html /usr/bin/home-server.html
24+
COPY home-server.html run_all.sh /usr/bin/
2425

2526
RUN chown -R 42420:42420 /workspace
2627

28+
RUN chown -R 42420:42420 /usr/bin/run_all.sh
29+
2730
#Default training env variables
2831
ENV model_name_or_path="facebook/wav2vec2-large-xlsr-53" \
2932
dataset_config_name="fr" \
@@ -45,4 +48,5 @@ ENV model_name_or_path="facebook/wav2vec2-large-xlsr-53" \
4548

4649
WORKDIR /workspace
4750
ENTRYPOINT []
51+
#CMD ["sh", "/usr/bin/run_all.sh"]
4852
CMD ["supervisord", "-n", "-u", "42420", "-c", "/etc/supervisor/supervisor.conf"]

generate_all_trainings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
next(csv_reader)
1818
for (language_code, language_full_name) in csv_reader:
1919
print(f"#Launching Training for {language_code}-{language_full_name}")
20-
cmd = f"ovhai job run --gpu 1 --name '{language_code}-{language_full_name}' --volume output_models@GRA:/workspace/output_models:RW:cache -e model_name_or_path='facebook/wav2vec2-large-xlsr-53' -e dataset_config_name={language_code} -e output_dir='/workspace/output_models/wav2vec2-large-xlsr-{language_code}-{language_full_name}-demo' -e cache_dir='/workspace/data' databuzzword/hf-wav2vec -- sh /workspace/wav2vec/finetune_with_params.sh"
20+
cmd = f"ovhai job run --gpu 1 --name '{language_code}-{language_full_name}' --volume output_models@GRA/{language_code}:/workspace/output_models:RW:cache -e model_name_or_path='facebook/wav2vec2-large-xlsr-53' -e dataset_config_name={language_code} -e output_dir='/workspace/output_models/wav2vec2-large-xlsr-{language_code}-{language_full_name}-demo' -e cache_dir='/workspace/data' -e num_train_epochs=10 databuzzword/hf-wav2vec -- sh /workspace/wav2vec/finetune_with_params.sh"
2121
print(cmd)
2222
stream = os.popen(cmd)
2323
output = stream.read()

run_all.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
supervisord -n -u 42420 -c /etc/supervisor/supervisor.conf

0 commit comments

Comments
 (0)