Let $S$ be the set of all points $(x,y,z)$ such that $x^2 + y^2 + z^2 \le 25$ and $z \ge 0.$  Compute the side length of the largest cube contained in $S.$
Note that $S$ is the upper-half of a sphere with radius 5.

Let $s$ be the side length of the cube.  Then one face of the cube aligns with the $xy$-plane; the center of this face is at $O = (0,0,0).$

[asy]
unitsize(1.2 cm);

pair A, B, C, D, O, T, X, Y, Z;
pair x, y, z;

x = (2,-0.2);
y = (1.2,0.8);
z = (0,2);

X = (0,0);
Y = x;
T = y;
A = z;
Z = x + y;
B = x + z;
D = y + z;
C = x + y + z;
O = (X + Y + T + Z)/4;

draw(X--Y--Z--C--D--A--cycle);
draw(B--A);
draw(B--C);
draw(B--Y);
draw(T--X,dashed);
draw(T--D,dashed);
draw(T--Z,dashed);
draw(O--Z,dashed);
draw(O--C,dashed);

label("$A$", Z, E);
label("$B$", C, NE);
dot("$O$", O, SW);
label("$s$", (C + Z)/2, dir(0));
[/asy]

Let $A$ be one vertex of this face, so
\[OA = \frac{\sqrt{2}}{2} s.\]Let $B$ be the vertex above $A,$ so $AB = s$ and $OB = 5.$  Then by Pythagoras, $OA^2 + AB^2 = OB^2,$ so
\[\frac{s^2}{2} + s^2 = 25.\]Then $s^2 = \frac{50}{3},$ so $s = \boxed{\frac{5 \sqrt{6}}{3}}.$