Spaces:
Runtime error
Runtime error
Refactor Dockerfile to install Rust and Cargo, Requirements, and Python dependencies
Browse files- Dockerfile +6 -8
Dockerfile
CHANGED
@@ -16,18 +16,16 @@ WORKDIR $HOME/app
|
|
16 |
|
17 |
# Copy the current directory contents into the container at /usr/src/app
|
18 |
# COPY . .
|
19 |
-
COPY --chown
|
20 |
|
21 |
# Switch to root user
|
22 |
USER root
|
23 |
|
24 |
-
# Install Rust
|
25 |
-
RUN
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
# pip install --upgrade pip && \
|
30 |
-
# pip install -r requirements.txt
|
31 |
|
32 |
# Make a port available to the world outside this container
|
33 |
# The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. Your container needs to listen to Streamlit’s (default) port 8501.
|
|
|
16 |
|
17 |
# Copy the current directory contents into the container at /usr/src/app
|
18 |
# COPY . .
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
|
21 |
# Switch to root user
|
22 |
USER root
|
23 |
|
24 |
+
# Install Rust and Cargo, Reqirements, and Python dependencies
|
25 |
+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
|
26 |
+
export PATH="/root/.cargo/bin:${PATH}" && \
|
27 |
+
pip install --upgrade pip && \
|
28 |
+
pip install -r requirements.txt
|
|
|
|
|
29 |
|
30 |
# Make a port available to the world outside this container
|
31 |
# The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. Your container needs to listen to Streamlit’s (default) port 8501.
|