scottsyms commited on
Commit
93e717a
·
1 Parent(s): 8fc2c42

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .env +3 -0
  2. Dockerfile +14 -13
.env ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ OPENAI_API_KEY=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
2
+
3
+
Dockerfile CHANGED
@@ -1,24 +1,25 @@
1
  FROM python:3.10
2
 
3
  WORKDIR /usr/src/app
4
- # RUN mkdir /usr/src/app/greenprocurementdb2
5
- # RUN mkdir /usr/src/app/pickle
6
- # RUN mkdir /usr/src/app/data
7
 
 
 
 
 
 
 
 
 
8
 
9
 
10
- COPY requirements.txt ./
11
- COPY ./greenprocurementdb2 ./greenprocurementdb2
12
- COPY ./pickle ./pickle
13
- COPY ./data ./data
14
- COPY ./model ./model
15
- COPY ./summaries ./summaries
16
 
17
- RUN pip install --upgrade pip
18
- RUN pip install --no-cache-dir -r requirements.txt
19
 
 
 
20
  COPY ./app.py ./
21
 
22
- EXPOSE 7860
23
 
24
- CMD [ "python", "./app.py" ]
 
1
  FROM python:3.10
2
 
3
  WORKDIR /usr/src/app
 
 
 
4
 
5
+ ENV PYTHONFAULTHANDLER=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ PYTHONHASHSEED=random \
8
+ PIP_NO_CACHE_DIR=off \
9
+ PIP_DISABLE_PIP_VERSION_CHECK=on \
10
+ PIP_DEFAULT_TIMEOUT=100
11
+
12
+ RUN pip install poetry
13
 
14
 
15
+ COPY poetry.lock ../pyproject.toml ./
16
+ COPY .env ./
 
 
 
 
17
 
 
 
18
 
19
+ RUN poetry config virtualenvs.create false \
20
+ && poetry install --no-interaction --no-ansi
21
  COPY ./app.py ./
22
 
23
+ EXPOSE 8080
24
 
25
+ CMD [ "poetry", "run", "python", "./app.py" ]