File size: 748 Bytes
71b4239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# CERNenv environment Space (Docker, CPU)
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PYTHONPATH=/home/user/app

RUN apt-get update && apt-get install -y --no-install-recommends \

        git curl ca-certificates build-essential \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -ms /bin/bash user
USER user
WORKDIR /home/user/app

COPY --chown=user:user space/env/requirements.txt /home/user/app/space-env-requirements.txt
RUN python -m pip install --upgrade pip && \

    python -m pip install --user -r /home/user/app/space-env-requirements.txt

COPY --chown=user:user . /home/user/app

EXPOSE 7860

CMD ["python", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]