forked from frodobots-org/earth-rovers-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_bkp
36 lines (28 loc) · 1.02 KB
/
Dockerfile_bkp
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
36
# Use a base image with Python
FROM --platform=linux/arm64/v8 python:3.9
# Define environment variables
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Install necessary packages and Chromium
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& apt-get install -y chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy the requirements and source code files
COPY requirements.txt .
COPY . .
# Create a virtual environment and install Python dependencies
RUN python3 -m venv venv && \
. venv/bin/activate && \
pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PATH="/app/venv/bin:$PATH"
# Expose the application port
EXPOSE 8000
# Command to run the application
CMD ["python3", "-m", "hypercorn", "main:app", "--bind", "0.0.0.0:8000"]