deploy-vllm2 / Dockerfile
Damien Benveniste
modified
ac0d581
raw
history blame
1.43 kB
# Use the official vLLM image as the base image
FROM vllm/vllm-openai:latest
# Set environment variables
# ENV HUGGING_FACE_HUB_TOKEN="your_hf_token_here"
ENV HF_HOME="/tmp/huggingface"
ENV XDG_CACHE_HOME="/tmp/cache"
ENV NUMBA_CACHE_DIR="/tmp/numba_cache"
ENV OUTLINES_CACHE_DIR="/tmp/outlines_cache"
# Create cache directories and set permissions
RUN mkdir -p /tmp/huggingface /tmp/cache /tmp/numba_cache /tmp/outlines_cache && \
chmod -R 777 /tmp/huggingface /tmp/cache /tmp/numba_cache /tmp/outlines_cache
# Set the working directory
WORKDIR /app
# Copy your entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Expose the port the app runs on
EXPOSE 8000
# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]
# FROM python:3.9
# # Create a non-root user
# RUN useradd -m -u 1000 user
# # Set the working directory in the container
# WORKDIR /app
# # Install vLLM
# RUN pip install --no-cache-dir vllm
# # Copy the entrypoint script
# COPY entrypoint.sh /app/entrypoint.sh
# # Change ownership of the working directory and entrypoint script to the non-root user
# RUN chown -R user:user /app
# # Change permissions of the entrypoint script
# RUN chmod +x /app/entrypoint.sh
# # Switch to the non-root user
# USER user
# # Set the PATH for the non-root user
# ENV PATH="/home/user/.local/bin:$PATH"
# EXPOSE 8000
# # Set the entrypoint
# ENTRYPOINT ["/app/entrypoint.sh"]