LoremPizza commited on
Commit
6a51b77
·
verified ·
1 Parent(s): bc31582

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -5
Dockerfile CHANGED
@@ -1,15 +1,30 @@
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim-buster
 
3
  # Set the working directory in the container to /app
4
  WORKDIR /app
5
 
6
- # Copy the current directory contents into the container at /app
7
- # (including run.py, filmpertutti.py, and requirements.txt)
8
- ADD . /app
 
 
 
 
 
 
 
 
 
 
 
 
9
  # Install any needed packages specified in requirements.txt
10
  RUN pip install --no-cache-dir -r requirements.txt
11
- #EXPOSE the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
 
12
  EXPOSE 8080
13
 
14
  # Run run.py when the container launches
15
- CMD ["python", "run.py"]
 
 
1
  # Use an official Python runtime as a parent image
2
  FROM python:3.10-slim-buster
3
+
4
  # Set the working directory in the container to /app
5
  WORKDIR /app
6
 
7
+ # Install git
8
+ RUN apt-get update && apt-get install -y git
9
+
10
+ # Remove existing MammaMia directory if it exists
11
+ RUN rm -rf MammaMia
12
+
13
+ # Clone the repository
14
+ RUN git clone https://github.com/UrloMythus/MammaMia.git
15
+
16
+ # Copy the local config.json file to the container
17
+ COPY config.json /app/config.json
18
+
19
+ # Change working directory to MammaMia where requirements.txt is present
20
+ WORKDIR /app/MammaMia
21
+
22
  # Install any needed packages specified in requirements.txt
23
  RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Expose the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
26
  EXPOSE 8080
27
 
28
  # Run run.py when the container launches
29
+ CMD ["python", "run.py"]
30
+