LoremPizza commited on
Commit
bdf38bd
·
verified ·
1 Parent(s): 8b5571a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Use an official Python runtime as a parent image
3
+ FROM python:3.10-slim-buster
4
+
5
+ # Set the working directory in the container to /app
6
+ WORKDIR /app
7
+
8
+ # Install git
9
+ RUN apt-get update && apt-get install -y git
10
+
11
+ # Clone the repository
12
+ RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
13
+ git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/UrloMythus/HF_Requests.git /app || true
14
+ # Copy the local config.json file to the container
15
+
16
+ # Install any needed packages specified in requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Expose the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
20
+ EXPOSE 8080
21
+
22
+ # Run run.py when the container launches
23
+ CMD ["python", "main.py"]