-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.12.7-alpine3.20
ADD ./requirements.txt /app/requirements.txt
RUN apk add build-base
RUN apk add git
RUN pip install --upgrade pip
RUN pip install --no-cache-dir cmake==3.31.0.1 --default-timeout=100 future
RUN pip install --no-cache-dir -r /app/requirements.txt --default-timeout=100 future
ADD ./portfolio /app
WORKDIR /app
# download https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF/resolve/main/qwen2.5-1.5b-instruct-q5_k_m.gguf
# and save it at /app/static/qwen2.5-1.5b-instruct-q5_k_m.gguf
RUN apk add wget
RUN wget https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF/resolve/main/qwen2.5-1.5b-instruct-q5_k_m.gguf -O /app/static/qwen2.5-1.5b-instruct-q5_k_m.gguf
ARG PORT=8080
EXPOSE ${PORT}
# Add the start script to the working directory
ADD ./start.sh /app/start.sh
# Make the start script executable
RUN chmod +x /app/start.sh
# make migrations
RUN python manage.py collectstatic --noinput
RUN python manage.py makemigrations --noinput
RUN python manage.py migrate --noinput
CMD ["/app/start.sh"]
# CMD ["gunicorn", "--bind", ${PORT:-8000}, "CristianDesivo.wsgi:application"]