Skip to content

Commit 87df232

Browse files
committed
Fix pymongo + docker issue
1 parent 0b93887 commit 87df232

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
FROM python:3.10-slim
2+
23
WORKDIR /app
4+
35
COPY . /app
46

57
RUN pip install --upgrade pip
6-
RUN pip install -r requirements.txt
8+
RUN pip uninstall -y bson || true
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
EXPOSE 8080
712

813
CMD ["python", "app.py"]

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ async def predict_route(request: Request, file: UploadFile = File(...)):
109109

110110
# MAIN
111111
if __name__ == "__main__":
112-
app_run(app, host="0.0.0.0", port=8000)
112+
app_run(app, host="0.0.0.0", port=8080)

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
python-dotenv
22
pandas
33
numpy
4-
pymongo
4+
pymongo[srv]>=4.3.0
55
certifi
6-
pymongo[srv]==3.6
76
scikit-learn
87
dill
9-
pyaml
8+
PyYAML
109
mlflow
1110
dagshub
1211
fastapi
1312
uvicorn
14-
python--multipart
15-
##-e .
13+
python-multipart
14+
#-e.

0 commit comments

Comments
 (0)