Spaces:
Sleeping
Sleeping
File size: 1,118 Bytes
3312e6e 4eb2e2b 3312e6e 4eb2e2b 3312e6e 4eb2e2b 3312e6e 9139f39 4eb2e2b 3d50cb4 4eb2e2b 3312e6e 4eb2e2b 09650d5 4eb2e2b 4b22690 4eb2e2b 3e932e8 69fa5af 4eb2e2b 3312e6e 4eb2e2b 3347fcb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# Install dependencies for Homebrew and building llama.cpp
RUN apt update && apt install -y \
build-essential \
curl \
file \
git \
sudo \
procps \
python3 \
python3-pip \
libssl-dev \
libcurl4-openssl-dev \
ruby \
unzip \
ca-certificates \
gnupg \
software-properties-common
# Create a non-root user (Homebrew prefers not to run as root)
RUN useradd -m brewuser && echo "brewuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER brewuser
WORKDIR /home/brewuser
# Install Homebrew
RUN git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew && \
mkdir ~/.linuxbrew/bin && \
ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin/
ENV PATH="/home/brewuser/.linuxbrew/bin:/home/brewuser/.linuxbrew/sbin:$PATH"
# Install llama-cpp via Homebrew
RUN brew update && brew install llama.cpp
# Set port for llama-server
EXPOSE 8080
# Run like on your machine
EXPOSE 7860
CMD ["llama-server", "-hf", "ggml-org/SmolVLM-500M-Instruct-GGUF", "--host", "0.0.0.0", "--port", "7860"]
|