Both castings of sanctuary end.
If the warded creature makes an attack, casts a spell that affects an enemy, or deals damage to another creature, this spell ends.
Since you are casting inflict wounds which goes on to affect an enemy, sanctuary ends for you. Find familiar states:
Finally, when you cast a spell with a range of touch, your familiar can deliver the spell as if it had cast the spell. Your familiar must be within 100 feet of you, and it must use its reaction to deliver the spell when you cast it. If the spell requires an attack roll, you use your attack modifier for the roll.
Now, your familiar delivers the spell as if it had cast it. This indicates that the familiar is making the attack for inflict wounds. If the familiar had cast inflict wounds it would deliver it by making an attack against the target, ergo it makes an attack when you cast the spell through the familiar. Therefore, sanctuary ends for the familiar as well.
It is worth mentioning that this does create an odd situation that might cause a DM to rule that sanctuary does not end for the caster of inflict wounds. If the familiar’s attack misses, one might argue that the inflict wounds spell did not affect the enemy creature, and so sanctuary would not end for the caster. I wouldn’t rule this way, but there is room for it.