Drive relays with optocoupler and a Raspberry pi
You are missing catch diodes on the relay coils. Back-EMF from relays will blow the transistors when they are turned off.

Power supply from DC/DC converter is perfectly okay for relays.

You can use a BC547 transistor or a driver chip like ULN2003 or ULN2803 (they have built-in diodes and base resistors).

Optocoupler is fine.