NoBlock4 / Dockerfile
LoremPizza's picture
Create Dockerfile
690e1a0 verified
raw
history blame contribute delete
743 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim-buster
# Set the working directory in the container to /app
WORKDIR /app
# Install git
RUN apt-get update && apt-get install -y git
# Clone the repository
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/UrloMythus/HF_Requests.git /app || true
# Copy the local config.json file to the container
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
EXPOSE 8080
# Run run.py when the container launches
CMD ["python", "main.py"]