If you're looking for a gym, do yourself a favor and don't just sign up for a 24-hour fitness membership without looking around. You can do a lot better for not much more money. About the only thing you can say in favor of 24h is that they're cheap and open late.
If you can afford ~$60 a month, you have a lot of options, particularly if you negotiate. The YMCA is a good option in this range, and they don't jerk you around with contracts and high-pressure sales.
But then...I have yet to go to a gym in San Francisco that didn't have at least one squat rack and space for deadlifts. I don't know where you were going that wasn't properly equipped for strength training.
Some dude who has a high chance of getting himself hurt and who might bust your floors is probably not even worth considering for membership in the big scheme of things. Too much of a hassle.
If you're looking for a gym to just lift heavy shit, this is the place. Yeah, there are some typical gym bros here, but I've never had an problems and everyone is pretty good at following proper gym etiquette.
In addition to all the options mentioned above, check out the city pools. The lap swims are $5 a go, with no contract at all. You just show up, slip Mr. Lincoln under the glass, and go do your thing.
That's the business model for (almost?) all gyms. Don't make a decision based on this; decide based on if the gym offers the equipment/availability/classes/etc. you need, feels like a place you'd like to go to, is in a convenient location, etc.