Dice with is used here in the general sense of play a game of chance with. In the mid 20th century dice with death was a journalistic cliché used to convey the risks taken by racing drivers. The expression seems for some time to have been especially connected with motoring, although it is now used of other risky activities. It gave rise to the use of dicing as a slang word among drivers for driving in a race and it can be compared with dicey meaning dangerous a word which originated in 1950s air-force slang.
RELATED IDIOMS :
load the dice against someone = load the dice in favour of someone
put someone at a disadvantage (or advantage)
1995 - Maclean's - What global warming has done is load the dice in favor of warmer than normal seasons and extreme climatic events.
used to refuse a request or indicate that there is no chance of success - North American informal
1990 - Paul Auster - The Music of Chance - Sorry kid. No dice. You can talk yourself blue in the face, but I'm not going.