LoremPizza commited on
Commit
c7b4c31
·
verified ·
1 Parent(s): 3721337

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -14
Dockerfile CHANGED
@@ -1,23 +1,15 @@
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
- # Copy the current directory contents into the container at /app
 
8
  ADD . /app
9
-
10
- # Install necessary packages
11
  RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Install cloudflared
14
- RUN apt-get update && \
15
- apt-get install -y curl && \
16
- curl -LO https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
17
- dpkg -i cloudflared-linux-amd64.deb
18
-
19
- # Expose the port for your application
20
  EXPOSE 8080
21
 
22
- # Run cloudflared and your FastAPI application
23
- CMD ["sh", "-c", "cloudflared tunnel --url http://localhost:8080 & python run.py"]
 
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"]