File size: 733 Bytes
e8a3f4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# NEEDLEPOINT Studio on Hugging Face Spaces (Docker SDK). Offline: no API keys, no model calls.
FROM python@sha256:e70237b264442328526ff29d6b3c43bd8abcf6cbab78a949322fb69b7d91d6b6
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 HOME=/tmp MPLCONFIGDIR=/tmp/matplotlib
WORKDIR /opt/needlepoint
COPY requirements.lock pyproject.toml README.md ./
RUN pip install -r requirements.lock
COPY needlepoint ./needlepoint
COPY studio ./studio
COPY recipes ./recipes
COPY evidence ./evidence
COPY LICENSE ./
# Spaces run the container as user 1000: give it the Studio's working folder.
RUN pip install --no-deps -e . && mkdir -p runs && chown -R 1000:1000 runs
USER 1000
EXPOSE 8000
CMD ["needlepoint", "serve", "--host", "0.0.0.0", "--port", "8000"]