How to calibrate a 6dof IMU

Try searching with the phrase "calibrate gyro".

Is there a way to avoid the magnetometer

Any horizontal reference that can be sensed will serve.