The direction of the magnetic field around a current-carrying conductor is given by the right-hand thumb rule. In the figure, the direction of the flow of the current is into the plane of the paper.
Therefore the needles of the compass would align as,
In the above figure, the arrowheads indicate the north direction.