File size: 784 Bytes
f6c4b6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
FROM python:3.11-slim-bookworm

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PYTHONPATH=/workspace

WORKDIR /workspace

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY core-python/requirements.txt /workspace/core-python/requirements.txt
RUN python3 -m pip install -r /workspace/core-python/requirements.txt

COPY core-python /workspace/core-python
COPY huggingface_human_training_space /workspace/huggingface_human_training_space

RUN python3 -m pip install -e /workspace/core-python --no-deps

EXPOSE 7860

CMD ["python3", "-m", "uvicorn", "--app-dir", "/workspace", "huggingface_human_training_space.app:app", "--host", "0.0.0.0", "--port", "7860"]