Reason / Dockerfile
riosst's picture
Upload 6 files
2f3315c verified
Raw
History Blame Contribute Delete
788 Bytes
FROM node:18-bullseye-slim
# Instalasi dependensi sistem (zstd untuk Ollama)
RUN apt-get update && apt-get install -y curl zstd && rm -rf /var/lib/apt/lists/*
# Instalasi Ollama resmi
RUN curl -fsSL https://ollama.com/install.sh | sh
# Setup direktori kerja
WORKDIR /app
# Pastikan folder milik user node (UID 1000)
RUN chown -R node:node /app
# Copy dependensi terpisah untuk caching layer
COPY --chown=node:node package*.json ./
RUN npm install --production
# Salin seluruh isi folder kita (termasuk folder 'public' yang sudah kita buat)
COPY --chown=node:node . .
# Izin eksekusi untuk startup script
RUN chmod +x start.sh
# Jalankan sebagai user node (standard 1000 untuk HF)
USER node
# Port wajib Hugging Face
EXPOSE 7860
# Jalankan skrip fusi Start.sh
CMD ["./start.sh"]