Spaces:
Build error
Build error
adapted Dockerfile and yaml file for Mamba
Browse files- Dockerfile +9 -9
- environment.yml +2 -2
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
# Use a
|
2 |
-
FROM
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
@@ -7,14 +7,15 @@ WORKDIR /app
|
|
7 |
# Copy the environment.yml file into the container
|
8 |
COPY environment.yml .
|
9 |
|
10 |
-
# Create the Conda environment
|
11 |
-
#
|
12 |
-
#
|
13 |
-
#
|
14 |
-
RUN
|
15 |
|
16 |
# Activate the Conda environment and set it as the default for subsequent commands
|
17 |
-
|
|
|
18 |
|
19 |
# Copy the rest of your application code
|
20 |
COPY . .
|
@@ -23,5 +24,4 @@ COPY . .
|
|
23 |
EXPOSE 7860
|
24 |
|
25 |
# Command to run your application when the container starts
|
26 |
-
# Make sure app.py is in the root of your /app directory inside the container
|
27 |
CMD ["python", "app.py"]
|
|
|
1 |
+
# Use a Mambaforge base image for faster and more memory-efficient solving
|
2 |
+
FROM condaforge/mambaforge:latest
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
|
|
7 |
# Copy the environment.yml file into the container
|
8 |
COPY environment.yml .
|
9 |
|
10 |
+
# Create the Conda environment using mamba and clean up
|
11 |
+
# mamba env create is the equivalent of conda env create but faster and less memory intensive
|
12 |
+
# The --yes flag answers yes to prompts
|
13 |
+
# mamba clean --all clears caches
|
14 |
+
RUN mamba env create --yes -f environment.yml && mamba clean --all
|
15 |
|
16 |
# Activate the Conda environment and set it as the default for subsequent commands
|
17 |
+
# Ensure the environment name matches what's in your environment.yml
|
18 |
+
ENV PATH /opt/conda/envs/research-agent-gpu/bin:$PATH
|
19 |
|
20 |
# Copy the rest of your application code
|
21 |
COPY . .
|
|
|
24 |
EXPOSE 7860
|
25 |
|
26 |
# Command to run your application when the container starts
|
|
|
27 |
CMD ["python", "app.py"]
|
environment.yml
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
|
7 |
name: research-agent-gpu
|
8 |
channels:
|
9 |
-
- pytorch
|
10 |
-
- nvidia
|
11 |
- conda-forge
|
12 |
- defaults
|
13 |
dependencies:
|
|
|
6 |
|
7 |
name: research-agent-gpu
|
8 |
channels:
|
9 |
+
# - pytorch
|
10 |
+
# - nvidia
|
11 |
- conda-forge
|
12 |
- defaults
|
13 |
dependencies:
|