Programming an atmega328p via raspberry pi gpio and avrdude incompatible with logic level shifter?

If you use a USB cable, then you can upload the sketch. There is a command line version of Arduino that runs on a Zero W without desktop.