biocell / Dockerfile
jiteshkprasad's picture
BioCell simulator
740efc9 verified
Raw History Blame Contribute Delete
646 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PORT=7860
# CPU-only PyTorch from the PyTorch CPU index, then the small rest
RUN pip install --index-url https://download.pytorch.org/whl/cpu torch
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# Hugging Face Docker Spaces run as user 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
HF_HOME=/home/user/.cache/huggingface
WORKDIR $HOME/app
COPY --chown=user app.py ./
COPY --chown=user sdk ./sdk
COPY --chown=user static ./static
EXPOSE 7860
CMD ["python", "app.py"]