Simplify Athena runtime and document current architecture
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM pytorch/pytorch:2.11.0-cuda12.8-cudnn9-runtime
|
||||
|
||||
ARG DIFFUSERS_VERSION=0.40.0
|
||||
ARG TRANSFORMERS_VERSION=5.15.1
|
||||
ARG ACCELERATE_VERSION=1.14.0
|
||||
ARG HF_HUB_VERSION=1.28.0
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3.12-venv && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
python -m venv --system-site-packages /opt/image-venv && \
|
||||
/opt/image-venv/bin/pip install --no-cache-dir \
|
||||
"diffusers==${DIFFUSERS_VERSION}" \
|
||||
"transformers==${TRANSFORMERS_VERSION}" \
|
||||
"accelerate==${ACCELERATE_VERSION}" \
|
||||
"huggingface-hub==${HF_HUB_VERSION}" \
|
||||
sentencepiece protobuf safetensors pillow && \
|
||||
useradd --system --uid 10002 --home /nonexistent --shell /usr/sbin/nologin image-worker
|
||||
|
||||
COPY image_worker.py /app/image_worker.py
|
||||
USER 10002:10002
|
||||
ENTRYPOINT ["/opt/image-venv/bin/python", "/app/image_worker.py"]
|
||||
Reference in New Issue
Block a user