@@ -221,74 +221,18 @@ This is helpful only if you want to build the compute worker image. It is not ne
221221To build the normal image :
222222
223223` ` ` bash
224- docker build -t codalab/competitions-v2-compute-worker:latest -f Dockerfile.compute_worker .
225- ` ` `
226-
227- To build the GPU version :
228- ` ` ` bash
229- docker build -t codalab/competitions-v2-compute-worker:gpu -f Dockerfile.compute_worker_gpu .
224+ docker build -t codalab/codabench-compute-worker:latest -f packaging/container/Containerfile.compute_worker .
230225` ` `
231226
232227To update the image (add tag `:latest`, `:gpu` or else if needed)
233228
234229` ` ` bash
235- docker push codalab/competitions-v2 -compute-worker
230+ docker push codalab/codabench -compute-worker
236231` ` `
237232
238233!!! note "If you have running compute workers, you'll need to pull again the image and to restart the workers to take into account the changes."
239234
240235
241- # # Worker management
242-
243- Outside of docker containers install [Fabric](http://fabfile.org/) like so :
244-
245- ` ` ` bash
246- pip install fab-classic==1.17.0
247- ` ` `
248-
249- Create a `server_config.yaml` in the root of this repository using :
250- ` ` `
251- cp server_config_sample.yaml server_config.yaml
252- ` ` `
253-
254- Below is an example `server_config.yaml` that defines 2 roles `comp-gpu` and `comp-cpu`,
255- one with GPU style workers (`is_gpu` and the GPU `docker_image`) and one with CPU style workers
256-
257- ` ` ` yaml title="server_config.yaml"
258- comp-gpu:
259- hosts:
260- - ubuntu@12.34.56.78
261- - ubuntu@12.34.56.79
262- broker_url: pyamqp://user:pass@host:port/vhost-gpu
263- is_gpu: true
264- docker_image: codalab/competitions-v2-compute-worker:gpu
265-
266- comp-cpu:
267- hosts:
268- - ubuntu@12.34.56.80
269- broker_url: pyamqp://user:pass@host:port/vhost-cpu
270- is_gpu: false
271- docker_image: codalab/competitions-v2-compute-worker:latest
272- ` ` `
273-
274- You can of course create your own `docker_image` and specify it here.
275-
276- You can execute commands against a role :
277-
278- ` ` ` bash
279- fab -R comp-gpu status
280- ..
281- [ubuntu@12.34.56.78] out: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
282- [ubuntu@12.34.56.78] out: 1d318268bee1 codalab/competitions-v2-compute-worker:gpu "/bin/sh -c 'celery …" 2 hours ago Up 2 hours hardcore_greider
283- ..
284-
285- fab -R comp-gpu update
286- ..
287- (updates workers)
288- ` ` `
289-
290- See available commands with `fab -l`
291-
292236# # Update docker image
293237
294238If the compute worker docker image was updated, you can reflect the changes using the following commands.
@@ -302,17 +246,7 @@ docker ps
302246Update the worker :
303247
304248` ` ` sh
305- docker stop compute_worker
306- docker rm compute_worker
307- docker pull codalab/competitions-v2-compute-worker:latest # or other relevant docker image
308- docker run \ # or docker compose up -d
309- -v /codabench:/codabench \
310- -v /var/run/docker.sock:/var/run/docker.sock \
311- -d \
312- --env-file .env \
313- --name compute_worker \
314- --restart unless-stopped \
315- --log-opt max-size=50m \
316- --log-opt max-file=3 \
317- codalab/codabench-compute-worker:latest # or other relevant docker image
249+ docker compose down
250+ docker compose pull
251+ docker compose up -d
318252` ` `
0 commit comments