Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +10 -2
Dockerfile
CHANGED
@@ -4,13 +4,21 @@ FROM python:3.9
|
|
4 |
# Set the working directory to /code
|
5 |
WORKDIR /code
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Copy the current directory contents into the container at /code
|
8 |
COPY ./pyproject.toml /code/pyproject.toml
|
9 |
COPY ./poetry.lock /code/poetry.lock
|
10 |
COPY ./index.md /code/index.md
|
11 |
|
12 |
-
# Install requirements.txt
|
13 |
-
RUN pip install poetry
|
|
|
14 |
|
15 |
# Set up a new user named "user" with user ID 1000
|
16 |
RUN useradd -m -u 1000 user
|
|
|
4 |
# Set the working directory to /code
|
5 |
WORKDIR /code
|
6 |
|
7 |
+
# Install system dependencies required for building Python packages
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
build-essential \
|
10 |
+
python3-dev \
|
11 |
+
gcc \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
# Copy the current directory contents into the container at /code
|
15 |
COPY ./pyproject.toml /code/pyproject.toml
|
16 |
COPY ./poetry.lock /code/poetry.lock
|
17 |
COPY ./index.md /code/index.md
|
18 |
|
19 |
+
# Install requirements.txt
|
20 |
+
RUN pip install poetry
|
21 |
+
RUN poetry install
|
22 |
|
23 |
# Set up a new user named "user" with user ID 1000
|
24 |
RUN useradd -m -u 1000 user
|