Spaces:
Sleeping
Sleeping
# Use the official Python image as the base image | |
FROM ubuntu:22.04 | |
# Set the working directory to /app | |
WORKDIR /app | |
# Install the necessary dependencies | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
cmake \ | |
make curl wget\ | |
&& rm -rf /var/lib/apt/lists/* | |
# Download the Llamafile | |
RUN wget https://huggingface.co/jartine/Phi-3-mini-4k-instruct-llamafile/resolve/main/Phi-3-mini-4k-instruct.Q4_K_M.llamafile | |
# Set the permissions on the Llamafile to be executable | |
RUN chmod +x ./Phi-3-mini-4k-instruct.Q4_K_M.llamafile | |
RUN apt install adduser -y | |
RUN addgroup --gid 1000 user | |
RUN adduser --uid 1000 --gid 1000 --disabled-password --gecos "" user | |
USER user | |
# Set the entrypoint to run the Llamafile | |
ENTRYPOINT ["bash", "./Phi-3-mini-4k-instruct.Q4_K_M.llamafile", "--host", "0.0.0.0"] |