Iwak commited on
Commit
a23de7e
·
1 Parent(s): e28098c
Files changed (1) hide show
  1. Dockerfile +2 -39
Dockerfile CHANGED
@@ -1,7 +1,6 @@
1
  ARG PYTHON_VERSION=3.10.13
2
  FROM python:${PYTHON_VERSION}-slim AS base
3
 
4
- # Install necessary packages including pipenv
5
  RUN apt-get update && \
6
  apt-get install -y pipenv && \
7
  apt-get install -y \
@@ -10,59 +9,23 @@ RUN apt-get update && \
10
  fonts-dejavu-core \
11
  fonts-dejavu-extra \
12
  fonts-liberation \
13
- fonts-noto \
14
- fonts-ubuntu &&\
15
  rm -rf /var/lib/apt/lists/*
16
 
17
  ENV PORT=7860
18
 
19
- # Set Pipenv to create the virtual environment in the project directory
20
  ENV PIPENV_VENV_IN_PROJECT=1
21
 
22
  WORKDIR /app
23
 
24
- # RUN mkdir -p /tmp/data && chmod -R 755 /tmp/data
25
-
26
- # Copy the requirements file
27
  COPY requirements.txt .
28
 
29
- # Install dependencies into a pipenv environment within the project
30
  RUN pipenv install --dev --ignore-pipfile
31
 
32
- # Copy the rest of the application code
33
  COPY . .
34
 
35
- # Expose the application port
36
  EXPOSE 7860
37
 
38
- # Ensure Python is installed correctly
39
  RUN python -V
40
 
41
- # Run the application using pipenv
42
- CMD pipenv run python -m gunicorn main:app -b 0.0.0.0:7860 -w 8 --timeout 600
43
-
44
-
45
- # ARG PYTHON_VERSION=3.10.13
46
- # FROM python:${PYTHON_VERSION}-slim AS base
47
-
48
- # RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*
49
-
50
- # ENV PORT=7860
51
-
52
- # RUN ls
53
-
54
- # WORKDIR /app
55
-
56
- # RUN ls
57
-
58
- # copy requirements.txt .
59
- # RUN python -m pip install --upgrade pip
60
- # RUN python -m pip install -r requirements.txt
61
-
62
- # COPY . .
63
-
64
- # EXPOSE 7860
65
-
66
- # RUN python -V
67
-
68
- # CMD sudo python -m gunicorn main:app -b 0.0.0.0:7860 -w 8 --timeout 600
 
1
  ARG PYTHON_VERSION=3.10.13
2
  FROM python:${PYTHON_VERSION}-slim AS base
3
 
 
4
  RUN apt-get update && \
5
  apt-get install -y pipenv && \
6
  apt-get install -y \
 
9
  fonts-dejavu-core \
10
  fonts-dejavu-extra \
11
  fonts-liberation \
12
+ fonts-noto && \
 
13
  rm -rf /var/lib/apt/lists/*
14
 
15
  ENV PORT=7860
16
 
 
17
  ENV PIPENV_VENV_IN_PROJECT=1
18
 
19
  WORKDIR /app
20
 
 
 
 
21
  COPY requirements.txt .
22
 
 
23
  RUN pipenv install --dev --ignore-pipfile
24
 
 
25
  COPY . .
26
 
 
27
  EXPOSE 7860
28
 
 
29
  RUN python -V
30
 
31
+ CMD pipenv run python -m gunicorn main:app -b 0.0.0.0:7860 -w 8 --timeout 600