Skip to content

Commit 627aa5d

Browse files
Indraneil PaulIndraneil Paul
authored andcommitted
README docker instructions
1 parent 2c33a26 commit 627aa5d

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pip install -U flash-attn
8989
```
9090

9191
To generate code samples from a model, you can use the following command:
92-
92+
>
9393
```shell
9494
wildcode.generate \
9595
--model [model_name] \
@@ -100,11 +100,35 @@ wildcode.generate \
100100
--temperature [temp] \
101101
--n_samples [n_samples] \
102102
--resume \
103-
--backend [vllm|hf|openai|mistral|anthropic|google]
103+
--backend [vllm|hf|openai|mistral|anthropic|google] \
104104
--tp [gpu_number]
105105
```
106-
The generated code samples will be stored in a file named `[model_name]--wildcodebench-[nl2c|c2c]--[backend]-[temp]-[n_samples].jsonl`.
107-
106+
>
107+
The generated code samples will be stored in a file named `[model_name]--wildcodebench-[nl2c|c2c]--[backend]-[temp]-[n_samples].jsonl`. Alternatively, you can use the following command to utilize our pre-built docker images for generating code samples:
108+
>
109+
```shell
110+
docker run --gpus '"device=$CUDA_VISIBLE_DEVICES"' -v $(pwd):/wildcode -t codeeval/code-eval-generate-cu11:25052024 --model [model_name] \
111+
--dataset [wildcodebench] \
112+
--nl2code [False|True] \
113+
--greedy \
114+
--bs [bs] \
115+
--temperature [temp] \
116+
--n_samples [n_samples] \
117+
--resume \
118+
--backend [vllm|hf|openai|mistral|anthropic|google] \
119+
--tp [gpu_number]
120+
```
121+
>
122+
We make available `cuda 11.8.0` and `cuda 12.1.1` pre-built docker images with the Dockerfiles available in the `Docker` directory.
123+
>
124+
If you wish to use gated or private HuggingFace models and datasets, you need to build the container yourself with `--build-arg` flags as follows:
125+
>
126+
```shell
127+
docker build --build-arg HF_TOKEN=<YOUR_HF_TOKEN> -t codeeval/code-eval-generate-cu11:latest - < Docker/Generate_Cuda11.Dockerfile
128+
```
129+
>
130+
Following which, you can run the built container as shown in above.
131+
>
108132
<details><summary>🤔 Structure of `problem`? <i>:: click to expand ::</i></summary>
109133
<div>
110134
@@ -164,7 +188,7 @@ You are strongly recommended to use a sandbox such as [docker](https://docs.dock
164188

165189
```shell
166190
# mount the current directory to the container
167-
docker run -v $(pwd):/wildcode terryzho/wildcode:latest --dataset wildcodebench --samples samples.jsonl
191+
docker run -v $(pwd):/wildcode codeeval/code-eval-evaluate:latest --dataset wildcodebench --samples samples.jsonl
168192
# ...Or locally ⚠️
169193
wildcode.evaluate --dataset wildcodebench --samples samples.jsonl
170194
```

0 commit comments

Comments
 (0)