Skip to content

Commit

Permalink
trying new python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
holohup committed Jul 19, 2024
1 parent e354e94 commit cdfae01
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
32 changes: 20 additions & 12 deletions bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FROM arm32v7/python:3.9.15-slim-bullseye as base
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
FROM python:3.11-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /base
RUN apt-get update && apt-get -y install gcc
COPY requirements.txt .
RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt

FROM arm32v7/python:3.9.15-slim-bullseye
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
COPY --from=base /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/
COPY --from=base /usr/local/bin/ /usr/local/bin/
WORKDIR /bot
RUN apt-get update && apt-get install libatomic1 -y
COPY . .
CMD ["python3", "main.py"]
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "main.py"]

# FROM arm32v7/python:3.9.15-slim-bullseye as base
# ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
# RUN apt-get update && apt-get -y install gcc
# COPY requirements.txt .
# RUN pip install --index-url=https://www.piwheels.org/simple --no-cache-dir -r requirements.txt

# FROM arm32v7/python:3.9.15-slim-bullseye
# ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
# COPY --from=base /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/
# COPY --from=base /usr/local/bin/ /usr/local/bin/
# WORKDIR /bot
# RUN apt-get update && apt-get install libatomic1 -y
# COPY . .
# CMD ["python3", "main.py"]
3 changes: 3 additions & 0 deletions bot/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ tinkoff-investments==0.2.0b54
python-dotenv==0.21.0
protobuf==3.20.2
aiogram==2.22.1
aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1
6 changes: 3 additions & 3 deletions trademan/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM arm32v7/python:3.9.15-slim-bullseye
FROM python:3.12-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /base
RUN apt-get update && apt-get -y install gcc
# RUN apt-get update && apt-get -y install gcc
COPY . .
RUN pip install -U -i https://www.piwheels.org/simple --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

0 comments on commit cdfae01

Please sign in to comment.