File size: 581 Bytes
5d4f37a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    HOME=/home/user \
    HARNESS_ENABLE_REAL=0

RUN useradd --create-home --uid 1000 user
WORKDIR /app
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY harnesslab_bundle.zip /tmp/harnesslab_bundle.zip
RUN python -m zipfile -e /tmp/harnesslab_bundle.zip /app \
    && chown -R user:user /app
USER user
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "space_app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]