@@ -37,7 +37,7 @@ for a complete description of the classes and functions this package implements.
37
37
## Installation
38
38
39
39
*** Note: Precompiled packages are currently only provided for Linux and
40
- Darwin/Mac OS and Python 3.6-3.8 . To use these packages on Windows, consider
40
+ Darwin/Mac OS and Python 3.6-3.9 . To use these packages on Windows, consider
41
41
using a [ TensorFlow Docker image] ( https://www.tensorflow.org/install/docker ) and
42
42
installing TensorFlow Compression using pip inside the Docker container.***
43
43
@@ -49,18 +49,13 @@ for more information on how to set up such a Python environment.
49
49
The current version of TensorFlow Compression requires TensorFlow 2. For
50
50
versions compatible with TensorFlow 1, see our [ previous
51
51
releases] ( https://github.com/tensorflow/compression/releases ) .
52
- *** Note: Because TFC currently relies on features and fixes designated for
53
- TF 2.5, the pip package currently depends on tf-nightly packages. Once TF 2.5 is
54
- released (likely in April 2021), we will resume depending on the stable version
55
- of TF.***
56
52
57
53
### pip
58
54
59
55
To install TFC via ` pip ` , run the following command:
60
56
61
57
``` bash
62
- pip uninstall -y tensorflow
63
- pip install tf-nightly==2.5.0.dev20210312 tensorflow-compression
58
+ pip install tensorflow-compression
64
59
```
65
60
66
61
To test that the installation works correctly, you can run the unit tests with:
@@ -81,8 +76,8 @@ and then run the `pip install` command inside the Docker container, not on the
81
76
host. For instance, you can use a command line like this:
82
77
83
78
``` bash
84
- docker run tensorflow/tensorflow:nightly bash -c \
85
- " pip install tf-nightly==2.5.0.dev20210312 tensorflow-compression &&
79
+ docker run tensorflow/tensorflow:2.5.0 bash -c \
80
+ " pip install tensorflow-compression &&
86
81
python -m tensorflow_compression.all_tests"
87
82
```
88
83
@@ -94,15 +89,19 @@ the pip package and then run the unit tests to confirm that it works.
94
89
It seems that [ Anaconda] ( https://www.anaconda.com/distribution/ ) ships its own
95
90
binary version of TensorFlow which is incompatible with our pip package. To
96
91
solve this, always install TensorFlow via ` pip ` rather than ` conda ` . For
97
- example, this creates an Anaconda environment with Python 3.8 and CUDA
98
- libraries, and then installs TensorFlow and TensorFlow Compression:
92
+ example, this creates an Anaconda environment with CUDA libraries, and then
93
+ installs TensorFlow and TensorFlow Compression:
99
94
100
95
``` bash
101
- conda create --name ENV_NAME python=3.8 cudatoolkit=10.0 cudnn
96
+ conda create --name ENV_NAME python cudatoolkit cudnn
102
97
conda activate ENV_NAME
103
- pip install tf-nightly==2.5.0.dev20210312 tensorflow-compression
98
+ pip install tensorflow-compression
104
99
```
105
100
101
+ Depending on the requirements of the ` tensorflow ` pip package, you may need to
102
+ pin the CUDA libraries to specific versions. If you aren't using a GPU, CUDA is
103
+ of course not necessary.
104
+
106
105
## Usage
107
106
108
107
We recommend importing the library from your Python code as follows:
0 commit comments