Living in an apartment building doesn't exempt you from composting, nor should it.
City law requires all residential properties, including apartments and condominiums, to make a food and yard waste cart available for residents. If your property doesnt have food and yard waste service, ask your property owner or manager to review the Apartment/Condo Owners website and sign up.
Our building supplied small compost containers to everyone at the start of the year (we already had one from a previous place) and they hold enough that we only need to empty it once a week. Every building/complex I've lived at, both in Seattle and upstate NY - and these aren't fancy places either - has had separate garbage, recycling, and compost bins outside since... 2007?