Problem 1: Magic sort

We need to sort a big file containing a lot of 7-digit integer numbers. The whole file cannot fit into the memory. The problem is to sort this file with the best performance. More precisely:
Input:   A file containing at most n positive integers, each less than n, where n=107. It is a fatal error if any integer occurs twice in the input. No other data is associated with the integer.
Output:   A sorted list in increasing order of the input integer.
Constraints:   At most (roughly) megabyte of storage is available in main memory; ample disk storage is available. The run time can be at most several minutes; a run time of ten seconds need not to be decreased.