TherapyEnglish / Dockerfile
Pavishanth68's picture
Update Dockerfile
c7d82d4 verified
raw
history blame contribute delete
781 Bytes
FROM python:3.10-slim
WORKDIR /app
COPY app.py .
# Install rust (needed for tokenizers)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl build-essential \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& . $HOME/.cargo/env \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Python packages with OLDER transformers version
RUN pip install --no-cache-dir \
gradio==4.36.1 \
transformers==4.38.0 \
torch==2.1.0 \
accelerate==0.33.0 \
sentencepiece==0.2.0 \
protobuf==3.20.3
# Install tokenizers separately
RUN pip install --no-cache-dir tokenizers==0.15.2
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
CMD ["python", "app.py"]